{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Time Series Analysis"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "pd.set_option('max_columns', 7,'display.expand_frame_repr', True, # 'max_rows', 10, \n",
    "    'max_colwidth', 12, 'max_rows', 10, #'precision', 2\n",
    ")#, 'width', 45)\n",
    "pd.set_option('display.width', 65)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [],
   "source": [
    "pd.set_option(#'max_columns', 4,\n",
    "    'max_rows', 10)\n",
    "from io import StringIO\n",
    "def txt_repr(df, width=40, rows=None):\n",
    "    buf = StringIO()\n",
    "    rows = rows if rows is not None else pd.options.display.max_rows\n",
    "    num_cols = len(df.columns)\n",
    "    with pd.option_context('display.width', 100):\n",
    "        df.to_string(buf=buf, max_cols=num_cols, max_rows=rows,line_width=width)\n",
    "        out = buf.getvalue()\n",
    "        for line in out.split('\\n'):\n",
    "            if len(line) > width or line.strip().endswith('\\\\'):\n",
    "                break\n",
    "        else:\n",
    "            return out\n",
    "        done = False\n",
    "        while not done:\n",
    "            buf = StringIO()\n",
    "            df.to_string(buf=buf, max_cols=num_cols, max_rows=rows,line_width=width)\n",
    "            for line in buf.getvalue().split('\\n'):\n",
    "                if line.strip().endswith('\\\\'):\n",
    "                    num_cols = min([num_cols - 1, int(num_cols*.8)])\n",
    "                    break\n",
    "            else:\n",
    "                break\n",
    "        return buf.getvalue()\n",
    "pd.DataFrame.__repr__ = lambda self, *args: txt_repr(self, 65, 10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Introduction"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Understanding the difference between Python and pandas date tools"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### How to do it..."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "date is 2013-06-07\n"
     ]
    }
   ],
   "source": [
    "import datetime\n",
    "date = datetime.date(year=2013, month=6, day=7)\n",
    "time = datetime.time(hour=12, minute=30,\n",
    "    second=19, microsecond=463198)\n",
    "dt = datetime.datetime(year=2013, month=6, day=7,\n",
    "    hour=12, minute=30, second=19,\n",
    "    microsecond=463198)\n",
    "print(f\"date is {date}\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "time is 12:30:19.463198\n"
     ]
    }
   ],
   "source": [
    "print(f\"time is {time}\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "datetime is 2013-06-07 12:30:19.463198\n"
     ]
    }
   ],
   "source": [
    "print(f\"datetime is {dt}\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "datetime.timedelta(19, 37206, 829008)"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "td = datetime.timedelta(weeks=2, days=5, hours=10,\n",
    "    minutes=20, seconds=6.73,\n",
    "    milliseconds=99, microseconds=8)\n",
    "td"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "new date is 2013-06-26\n"
     ]
    }
   ],
   "source": [
    "print(f'new date is {date+td}')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "new datetime is 2013-06-26 22:50:26.292206\n"
     ]
    }
   ],
   "source": [
    "print(f'new datetime is {dt+td}')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "ename": "TypeError",
     "evalue": "unsupported operand type(s) for +: 'datetime.time' and 'datetime.timedelta'",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mTypeError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-17-1bc8485497ad>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mtime\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0mtd\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;31mTypeError\u001b[0m: unsupported operand type(s) for +: 'datetime.time' and 'datetime.timedelta'"
     ]
    }
   ],
   "source": [
    "time + td"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 156,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('2012-12-21 05:10:08.000099')"
      ]
     },
     "execution_count": 156,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.Timestamp(year=2012, month=12, day=21, hour=5,\n",
    "   minute=10, second=8, microsecond=99)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 157,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('2016-01-10 00:00:00')"
      ]
     },
     "execution_count": 157,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.Timestamp('2016/1/10')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 158,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('2014-05-10 00:00:00')"
      ]
     },
     "execution_count": 158,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.Timestamp('2014-5/10')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 159,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('2019-01-03 20:45:33')"
      ]
     },
     "execution_count": 159,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.Timestamp('Jan 3, 2019 20:45.56')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 160,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('2016-01-05 05:34:43.123456789')"
      ]
     },
     "execution_count": 160,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.Timestamp('2016-01-05T05:34:43.123456789')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 161,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('1970-01-01 00:00:00.000000500')"
      ]
     },
     "execution_count": 161,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.Timestamp(500)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 162,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('1983-09-10 00:00:00')"
      ]
     },
     "execution_count": 162,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.Timestamp(5000, unit='D')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 163,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('2015-05-13 00:00:00')"
      ]
     },
     "execution_count": 163,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.to_datetime('2015-5-13')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 164,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('2015-05-13 00:00:00')"
      ]
     },
     "execution_count": 164,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.to_datetime('2015-13-5', dayfirst=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 165,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('2017-09-30 13:30:00')"
      ]
     },
     "execution_count": 165,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.to_datetime('Start Date: Sep 30, 2017 Start Time: 1:30 pm',\n",
    "    format='Start Date: %b %d, %Y Start Time: %I:%M %p')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 166,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('2013-04-11 00:00:00')"
      ]
     },
     "execution_count": 166,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.to_datetime(100, unit='D', origin='2013-1-1')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 167,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0   1970-01-11\n",
       "1   1970-04-11\n",
       "2   1972-09-27\n",
       "3   1997-05-19\n",
       "dtype: datetime64[ns]"
      ]
     },
     "execution_count": 167,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s = pd.Series([10, 100, 1000, 10000])\n",
    "pd.to_datetime(s, unit='D')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 168,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [],
   "source": [
    "s = pd.Series(['12-5-2015', '14-1-2013',\n",
    "   '20/12/2017', '40/23/2017'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 169,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0   2015-05-12\n",
       "1   2013-01-14\n",
       "2   2017-12-20\n",
       "3          NaT\n",
       "dtype: datetime64[ns]"
      ]
     },
     "execution_count": 169,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.to_datetime(s, dayfirst=True, errors='coerce')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 170,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DatetimeIndex(['1999-08-03 03:45:56', '2017-10-31 00:00:00'], dtype='datetime64[ns]', freq=None)"
      ]
     },
     "execution_count": 170,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.to_datetime(['Aug 3 1999 3:45:56', '10/31/2017'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 171,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timedelta('12 days 05:03:00.123456')"
      ]
     },
     "execution_count": 171,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.Timedelta('12 days 5 hours 3 minutes 123456789 nanoseconds')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 172,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timedelta('5 days 00:07:20.400000')"
      ]
     },
     "execution_count": 172,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.Timedelta(days=5, minutes=7.34)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 173,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timedelta('700 days 00:00:00')"
      ]
     },
     "execution_count": 173,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.Timedelta(100, unit='W')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 174,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timedelta('2 days 19:15:45.454000')"
      ]
     },
     "execution_count": 174,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.to_timedelta('67:15:45.454')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 175,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0   00:00:10\n",
       "1   00:01:40\n",
       "dtype: timedelta64[ns]"
      ]
     },
     "execution_count": 175,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s = pd.Series([10, 100])\n",
    "pd.to_timedelta(s, unit='s')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 176,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "TimedeltaIndex(['2 days 00:25:29.670000', '0 days 00:45:23.600000'], dtype='timedelta64[ns]', freq=None)"
      ]
     },
     "execution_count": 176,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "time_strings = ['2 days 24 minutes 89.67 seconds',\n",
    "    '00:45:23.6']\n",
    "pd.to_timedelta(time_strings)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 177,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timedelta('24 days 10:06:00')"
      ]
     },
     "execution_count": 177,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.Timedelta('12 days 5 hours 3 minutes') * 2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 178,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('2017-01-25 10:06:00')"
      ]
     },
     "execution_count": 178,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(pd.Timestamp('1/1/2017') + \n",
    "   pd.Timedelta('12 days 5 hours 3 minutes') * 2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 179,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "TimedeltaIndex(['03:00:10', '04:01:40'], dtype='timedelta64[ns]', freq=None)"
      ]
     },
     "execution_count": 179,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "td1 = pd.to_timedelta([10, 100], unit='s')\n",
    "td2 = pd.to_timedelta(['3 hours', '4 hours'])\n",
    "td1 + td2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 180,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4.0"
      ]
     },
     "execution_count": 180,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.Timedelta('12 days') / pd.Timedelta('3 days')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 181,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('2016-10-01 05:00:00')"
      ]
     },
     "execution_count": 181,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts = pd.Timestamp('2016-10-1 4:23:23.9')\n",
    "ts.ceil('h')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 182,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(2016, 10, 1, 4, 23, 23)"
      ]
     },
     "execution_count": 182,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts.year, ts.month, ts.day, ts.hour, ts.minute, ts.second"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 183,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(5, 275, 31)"
      ]
     },
     "execution_count": 183,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts.dayofweek, ts.dayofyear, ts.daysinmonth"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 184,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "datetime.datetime(2016, 10, 1, 4, 23, 23, 900000)"
      ]
     },
     "execution_count": 184,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts.to_pydatetime()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 185,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timedelta('5 days 05:52:20.280000')"
      ]
     },
     "execution_count": 185,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "td = pd.Timedelta(125.8723, unit='h')\n",
    "td"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 186,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timedelta('5 days 05:52:00')"
      ]
     },
     "execution_count": 186,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "td.round('min')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 187,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Components(days=5, hours=5, minutes=52, seconds=20, milliseconds=280, microseconds=0, nanoseconds=0)"
      ]
     },
     "execution_count": 187,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "td.components"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 188,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "453140.28"
      ]
     },
     "execution_count": 188,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "td.total_seconds()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### How it works..."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### There's more..."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 189,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "8 ms ± 1.07 ms per loop (mean ± std. dev. of 7 runs, 100 loops each)\n"
     ]
    }
   ],
   "source": [
    "date_string_list = ['Sep 30 1984'] * 10000\n",
    "%timeit pd.to_datetime(date_string_list, format='%b %d %Y')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 190,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "7.33 ms ± 512 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)\n"
     ]
    }
   ],
   "source": [
    "%timeit pd.to_datetime(date_string_list)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Slicing time series intelligently"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### How to do it..."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 191,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "OFFENSE_TYPE_ID           category\n",
       "OFFENSE_CATEGORY_ID       category\n",
       "REPORTED_DATE          datetime...\n",
       "GEO_LON                    float64\n",
       "GEO_LAT                    float64\n",
       "NEIGHBORHOOD_ID           category\n",
       "IS_CRIME                     int64\n",
       "IS_TRAFFIC                   int64\n",
       "dtype: object"
      ]
     },
     "execution_count": 191,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime = pd.read_hdf('data/crime.h5', 'crime')\n",
    "crime.dtypes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 192,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>OFFENSE_TYPE_ID</th>\n",
       "      <th>OFFENSE_CATEGORY_ID</th>\n",
       "      <th>GEO_LON</th>\n",
       "      <th>GEO_LAT</th>\n",
       "      <th>NEIGHBORHOOD_ID</th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2014-06-29 02:01:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-105.000149</td>\n",
       "      <td>39.745753</td>\n",
       "      <td>cbd</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014-06-29 01:54:00</th>\n",
       "      <td>vehicula...</td>\n",
       "      <td>all-othe...</td>\n",
       "      <td>-104.884660</td>\n",
       "      <td>39.738702</td>\n",
       "      <td>east-colfax</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014-06-29 02:00:00</th>\n",
       "      <td>disturbi...</td>\n",
       "      <td>public-d...</td>\n",
       "      <td>-105.020719</td>\n",
       "      <td>39.706674</td>\n",
       "      <td>athmar-park</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014-06-29 02:18:00</th>\n",
       "      <td>curfew</td>\n",
       "      <td>public-d...</td>\n",
       "      <td>-105.001552</td>\n",
       "      <td>39.769505</td>\n",
       "      <td>sunnyside</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014-06-29 04:17:00</th>\n",
       "      <td>aggravat...</td>\n",
       "      <td>aggravat...</td>\n",
       "      <td>-105.018557</td>\n",
       "      <td>39.679229</td>\n",
       "      <td>college-...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-09-13 05:48:00</th>\n",
       "      <td>burglary...</td>\n",
       "      <td>burglary</td>\n",
       "      <td>-105.033840</td>\n",
       "      <td>39.762365</td>\n",
       "      <td>west-hig...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-09-12 20:37:00</th>\n",
       "      <td>weapon-u...</td>\n",
       "      <td>all-othe...</td>\n",
       "      <td>-105.040313</td>\n",
       "      <td>39.721264</td>\n",
       "      <td>barnum-west</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-09-12 16:32:00</th>\n",
       "      <td>traf-hab...</td>\n",
       "      <td>all-othe...</td>\n",
       "      <td>-104.847024</td>\n",
       "      <td>39.779596</td>\n",
       "      <td>montbello</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-09-12 13:04:00</th>\n",
       "      <td>criminal...</td>\n",
       "      <td>public-d...</td>\n",
       "      <td>-104.949183</td>\n",
       "      <td>39.756353</td>\n",
       "      <td>skyland</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-09-12 09:30:00</th>\n",
       "      <td>theft-other</td>\n",
       "      <td>larceny</td>\n",
       "      <td>-104.985739</td>\n",
       "      <td>39.735045</td>\n",
       "      <td>capitol-...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>460911 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "             OFFENSE_TYPE_ID  ... IS_TRAFFIC\n",
       "REPORTED_...                  ...           \n",
       "2014-06-2...  traffic-...     ...          1\n",
       "2014-06-2...  vehicula...     ...          0\n",
       "2014-06-2...  disturbi...     ...          0\n",
       "2014-06-2...       curfew     ...          0\n",
       "2014-06-2...  aggravat...     ...          0\n",
       "...                   ...     ...        ...\n",
       "2017-09-1...  burglary...     ...          0\n",
       "2017-09-1...  weapon-u...     ...          0\n",
       "2017-09-1...  traf-hab...     ...          0\n",
       "2017-09-1...  criminal...     ...          0\n",
       "2017-09-1...  theft-other     ...          0"
      ]
     },
     "execution_count": 192,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime = crime.set_index('REPORTED_DATE')\n",
    "crime"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 193,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>OFFENSE_TYPE_ID</th>\n",
       "      <th>OFFENSE_CATEGORY_ID</th>\n",
       "      <th>GEO_LON</th>\n",
       "      <th>GEO_LAT</th>\n",
       "      <th>NEIGHBORHOOD_ID</th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2016-05-12 16:45:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.847024</td>\n",
       "      <td>39.779596</td>\n",
       "      <td>montbello</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-05-12 16:45:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-105.049180</td>\n",
       "      <td>39.769296</td>\n",
       "      <td>west-hig...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-05-12 16:45:00</th>\n",
       "      <td>fraud-id...</td>\n",
       "      <td>white-co...</td>\n",
       "      <td>-104.931971</td>\n",
       "      <td>39.717359</td>\n",
       "      <td>hilltop</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             OFFENSE_TYPE_ID  ... IS_TRAFFIC\n",
       "REPORTED_...                  ...           \n",
       "2016-05-1...  traffic-...     ...          1\n",
       "2016-05-1...  traffic-...     ...          1\n",
       "2016-05-1...  fraud-id...     ...          0"
      ]
     },
     "execution_count": 193,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime.loc['2016-05-12 16:45:00']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 194,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>OFFENSE_TYPE_ID</th>\n",
       "      <th>OFFENSE_CATEGORY_ID</th>\n",
       "      <th>GEO_LON</th>\n",
       "      <th>GEO_LAT</th>\n",
       "      <th>NEIGHBORHOOD_ID</th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2016-05-12 23:51:00</th>\n",
       "      <td>criminal...</td>\n",
       "      <td>public-d...</td>\n",
       "      <td>-105.017241</td>\n",
       "      <td>39.705845</td>\n",
       "      <td>athmar-park</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-05-12 18:40:00</th>\n",
       "      <td>liquor-p...</td>\n",
       "      <td>drug-alc...</td>\n",
       "      <td>-104.995692</td>\n",
       "      <td>39.747875</td>\n",
       "      <td>cbd</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-05-12 22:26:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.880037</td>\n",
       "      <td>39.777037</td>\n",
       "      <td>stapleton</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-05-12 20:35:00</th>\n",
       "      <td>theft-bi...</td>\n",
       "      <td>larceny</td>\n",
       "      <td>-104.929350</td>\n",
       "      <td>39.763797</td>\n",
       "      <td>northeas...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-05-12 09:39:00</th>\n",
       "      <td>theft-of...</td>\n",
       "      <td>auto-theft</td>\n",
       "      <td>-104.941233</td>\n",
       "      <td>39.775510</td>\n",
       "      <td>elyria-s...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-05-12 17:55:00</th>\n",
       "      <td>public-p...</td>\n",
       "      <td>public-d...</td>\n",
       "      <td>-105.027747</td>\n",
       "      <td>39.700029</td>\n",
       "      <td>westwood</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-05-12 19:24:00</th>\n",
       "      <td>threats-...</td>\n",
       "      <td>public-d...</td>\n",
       "      <td>-104.947118</td>\n",
       "      <td>39.763777</td>\n",
       "      <td>clayton</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-05-12 22:28:00</th>\n",
       "      <td>sex-aslt...</td>\n",
       "      <td>sexual-a...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>harvey-p...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-05-12 15:59:00</th>\n",
       "      <td>menacing...</td>\n",
       "      <td>aggravat...</td>\n",
       "      <td>-104.935172</td>\n",
       "      <td>39.723703</td>\n",
       "      <td>hilltop</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-05-12 16:39:00</th>\n",
       "      <td>assault-dv</td>\n",
       "      <td>other-cr...</td>\n",
       "      <td>-104.974700</td>\n",
       "      <td>39.740555</td>\n",
       "      <td>north-ca...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>243 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "             OFFENSE_TYPE_ID  ... IS_TRAFFIC\n",
       "REPORTED_...                  ...           \n",
       "2016-05-1...  criminal...     ...          0\n",
       "2016-05-1...  liquor-p...     ...          0\n",
       "2016-05-1...  traffic-...     ...          1\n",
       "2016-05-1...  theft-bi...     ...          0\n",
       "2016-05-1...  theft-of...     ...          0\n",
       "...                   ...     ...        ...\n",
       "2016-05-1...  public-p...     ...          0\n",
       "2016-05-1...  threats-...     ...          0\n",
       "2016-05-1...  sex-aslt...     ...          0\n",
       "2016-05-1...  menacing...     ...          0\n",
       "2016-05-1...   assault-dv     ...          0"
      ]
     },
     "execution_count": 194,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime.loc['2016-05-12']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 195,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(8012, 7)"
      ]
     },
     "execution_count": 195,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime.loc['2016-05'].shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 196,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(91076, 7)"
      ]
     },
     "execution_count": 196,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime.loc['2016'].shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 197,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(4, 7)"
      ]
     },
     "execution_count": 197,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime.loc['2016-05-12 03'].shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 198,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>OFFENSE_TYPE_ID</th>\n",
       "      <th>OFFENSE_CATEGORY_ID</th>\n",
       "      <th>GEO_LON</th>\n",
       "      <th>GEO_LAT</th>\n",
       "      <th>NEIGHBORHOOD_ID</th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2015-12-01 00:48:00</th>\n",
       "      <td>drug-coc...</td>\n",
       "      <td>drug-alc...</td>\n",
       "      <td>-104.891681</td>\n",
       "      <td>39.740155</td>\n",
       "      <td>east-colfax</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-12-01 00:48:00</th>\n",
       "      <td>theft-of...</td>\n",
       "      <td>auto-theft</td>\n",
       "      <td>-104.891681</td>\n",
       "      <td>39.740155</td>\n",
       "      <td>east-colfax</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-12-01 01:00:00</th>\n",
       "      <td>criminal...</td>\n",
       "      <td>public-d...</td>\n",
       "      <td>-104.993574</td>\n",
       "      <td>39.739773</td>\n",
       "      <td>civic-ce...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-12-01 01:10:00</th>\n",
       "      <td>traf-other</td>\n",
       "      <td>all-othe...</td>\n",
       "      <td>-104.995496</td>\n",
       "      <td>39.725618</td>\n",
       "      <td>baker</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-12-01 01:10:00</th>\n",
       "      <td>traf-hab...</td>\n",
       "      <td>all-othe...</td>\n",
       "      <td>-104.995496</td>\n",
       "      <td>39.725618</td>\n",
       "      <td>baker</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-12-31 23:35:00</th>\n",
       "      <td>drug-coc...</td>\n",
       "      <td>drug-alc...</td>\n",
       "      <td>-104.988019</td>\n",
       "      <td>39.753420</td>\n",
       "      <td>five-points</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-12-31 23:40:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.945076</td>\n",
       "      <td>39.736768</td>\n",
       "      <td>congress...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-12-31 23:44:00</th>\n",
       "      <td>drug-coc...</td>\n",
       "      <td>drug-alc...</td>\n",
       "      <td>-104.966814</td>\n",
       "      <td>39.746460</td>\n",
       "      <td>city-par...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-12-31 23:45:00</th>\n",
       "      <td>violatio...</td>\n",
       "      <td>all-othe...</td>\n",
       "      <td>-105.034887</td>\n",
       "      <td>39.741827</td>\n",
       "      <td>west-colfax</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-12-31 23:50:00</th>\n",
       "      <td>weapon-p...</td>\n",
       "      <td>all-othe...</td>\n",
       "      <td>-105.032769</td>\n",
       "      <td>39.709188</td>\n",
       "      <td>westwood</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>6907 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "             OFFENSE_TYPE_ID  ... IS_TRAFFIC\n",
       "REPORTED_...                  ...           \n",
       "2015-12-0...  drug-coc...     ...          0\n",
       "2015-12-0...  theft-of...     ...          0\n",
       "2015-12-0...  criminal...     ...          0\n",
       "2015-12-0...   traf-other     ...          0\n",
       "2015-12-0...  traf-hab...     ...          0\n",
       "...                   ...     ...        ...\n",
       "2015-12-3...  drug-coc...     ...          0\n",
       "2015-12-3...  traffic-...     ...          1\n",
       "2015-12-3...  drug-coc...     ...          0\n",
       "2015-12-3...  violatio...     ...          0\n",
       "2015-12-3...  weapon-p...     ...          0"
      ]
     },
     "execution_count": 198,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime.loc['Dec 2015'].sort_index()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 199,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(252, 7)"
      ]
     },
     "execution_count": 199,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime.loc['2016 Sep, 15'].shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 200,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(4, 7)"
      ]
     },
     "execution_count": 200,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime.loc['21st October 2014 05'].shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 201,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>OFFENSE_TYPE_ID</th>\n",
       "      <th>OFFENSE_CATEGORY_ID</th>\n",
       "      <th>GEO_LON</th>\n",
       "      <th>GEO_LAT</th>\n",
       "      <th>NEIGHBORHOOD_ID</th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2015-03-04 00:11:00</th>\n",
       "      <td>assault-dv</td>\n",
       "      <td>other-cr...</td>\n",
       "      <td>-105.021966</td>\n",
       "      <td>39.770883</td>\n",
       "      <td>sunnyside</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-03-04 00:19:00</th>\n",
       "      <td>assault-dv</td>\n",
       "      <td>other-cr...</td>\n",
       "      <td>-104.978988</td>\n",
       "      <td>39.748799</td>\n",
       "      <td>five-points</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-03-04 00:27:00</th>\n",
       "      <td>theft-of...</td>\n",
       "      <td>larceny</td>\n",
       "      <td>-105.055082</td>\n",
       "      <td>39.790564</td>\n",
       "      <td>regis</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-03-04 00:49:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.987454</td>\n",
       "      <td>39.701378</td>\n",
       "      <td>washingt...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-03-04 01:07:00</th>\n",
       "      <td>burglary...</td>\n",
       "      <td>burglary</td>\n",
       "      <td>-105.010843</td>\n",
       "      <td>39.762538</td>\n",
       "      <td>highland</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-01 23:15:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.996861</td>\n",
       "      <td>39.738612</td>\n",
       "      <td>civic-ce...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-01 23:16:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-105.025088</td>\n",
       "      <td>39.707590</td>\n",
       "      <td>westwood</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-01 23:40:00</th>\n",
       "      <td>robbery-...</td>\n",
       "      <td>robbery</td>\n",
       "      <td>-105.039236</td>\n",
       "      <td>39.726157</td>\n",
       "      <td>villa-park</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-01 23:45:00</th>\n",
       "      <td>drug-coc...</td>\n",
       "      <td>drug-alc...</td>\n",
       "      <td>-104.987310</td>\n",
       "      <td>39.753598</td>\n",
       "      <td>five-points</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-01 23:48:00</th>\n",
       "      <td>drug-pos...</td>\n",
       "      <td>drug-alc...</td>\n",
       "      <td>-104.986020</td>\n",
       "      <td>39.752541</td>\n",
       "      <td>five-points</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>75403 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "             OFFENSE_TYPE_ID  ... IS_TRAFFIC\n",
       "REPORTED_...                  ...           \n",
       "2015-03-0...   assault-dv     ...          0\n",
       "2015-03-0...   assault-dv     ...          0\n",
       "2015-03-0...  theft-of...     ...          0\n",
       "2015-03-0...  traffic-...     ...          1\n",
       "2015-03-0...  burglary...     ...          0\n",
       "...                   ...     ...        ...\n",
       "2016-01-0...  traffic-...     ...          1\n",
       "2016-01-0...  traffic-...     ...          1\n",
       "2016-01-0...  robbery-...     ...          0\n",
       "2016-01-0...  drug-coc...     ...          0\n",
       "2016-01-0...  drug-pos...     ...          0"
      ]
     },
     "execution_count": 201,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime.loc['2015-3-4':'2016-1-1'].sort_index()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 202,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>OFFENSE_TYPE_ID</th>\n",
       "      <th>OFFENSE_CATEGORY_ID</th>\n",
       "      <th>GEO_LON</th>\n",
       "      <th>GEO_LAT</th>\n",
       "      <th>NEIGHBORHOOD_ID</th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2015-03-04 22:25:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.973896</td>\n",
       "      <td>39.769064</td>\n",
       "      <td>five-points</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-03-04 22:30:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.906412</td>\n",
       "      <td>39.632816</td>\n",
       "      <td>hampden-...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-03-04 22:32:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.979180</td>\n",
       "      <td>39.706613</td>\n",
       "      <td>washingt...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-03-04 22:33:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.991655</td>\n",
       "      <td>39.740067</td>\n",
       "      <td>civic-ce...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-03-04 22:36:00</th>\n",
       "      <td>theft-un...</td>\n",
       "      <td>white-co...</td>\n",
       "      <td>-105.045235</td>\n",
       "      <td>39.667928</td>\n",
       "      <td>harvey-park</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-01 11:10:00</th>\n",
       "      <td>theft-of...</td>\n",
       "      <td>auto-theft</td>\n",
       "      <td>-104.819450</td>\n",
       "      <td>39.791615</td>\n",
       "      <td>montbello</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-01 11:11:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.981701</td>\n",
       "      <td>39.736814</td>\n",
       "      <td>capitol-...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-01 11:11:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.973731</td>\n",
       "      <td>39.714223</td>\n",
       "      <td>speer</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-01 11:16:00</th>\n",
       "      <td>traf-other</td>\n",
       "      <td>all-othe...</td>\n",
       "      <td>-104.977509</td>\n",
       "      <td>39.783541</td>\n",
       "      <td>globeville</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-01 11:22:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-105.053250</td>\n",
       "      <td>39.731282</td>\n",
       "      <td>villa-park</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>75071 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "             OFFENSE_TYPE_ID  ... IS_TRAFFIC\n",
       "REPORTED_...                  ...           \n",
       "2015-03-0...  traffic-...     ...          1\n",
       "2015-03-0...  traffic-...     ...          1\n",
       "2015-03-0...  traffic-...     ...          1\n",
       "2015-03-0...  traffic-...     ...          1\n",
       "2015-03-0...  theft-un...     ...          0\n",
       "...                   ...     ...        ...\n",
       "2016-01-0...  theft-of...     ...          0\n",
       "2016-01-0...  traffic-...     ...          1\n",
       "2016-01-0...  traffic-...     ...          1\n",
       "2016-01-0...   traf-other     ...          0\n",
       "2016-01-0...  traffic-...     ...          1"
      ]
     },
     "execution_count": 202,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime.loc['2015-3-4 22':'2016-1-1 11:22:00'].sort_index()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### How it works..."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 203,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(29.4, 122.7)"
      ]
     },
     "execution_count": 203,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mem_cat = crime.memory_usage().sum()\n",
    "mem_obj = (crime\n",
    "   .astype({'OFFENSE_TYPE_ID':'object',\n",
    "            'OFFENSE_CATEGORY_ID':'object',\n",
    "           'NEIGHBORHOOD_ID':'object'}) \n",
    "   .memory_usage(deep=True)\n",
    "   .sum()\n",
    ")\n",
    "mb = 2 ** 20\n",
    "round(mem_cat / mb, 1), round(mem_obj / mb, 1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 204,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DatetimeIndex(['2014-06-29 02:01:00', '2014-06-29 01:54:00'], dtype='datetime64[ns]', name='REPORTED_DATE', freq=None)"
      ]
     },
     "execution_count": 204,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime.index[:2]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### There's more..."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 205,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "17.3 ms ± 7.12 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)\n"
     ]
    }
   ],
   "source": [
    "%timeit crime.loc['2015-3-4':'2016-1-1']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 206,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1.86 ms ± 126 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)\n"
     ]
    }
   ],
   "source": [
    "crime_sort = crime.sort_index()\n",
    "%timeit crime_sort.loc['2015-3-4':'2016-1-1']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Filtering columns with time data"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### How to do it... "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 207,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "OFFENSE_TYPE_ID           category\n",
       "OFFENSE_CATEGORY_ID       category\n",
       "REPORTED_DATE          datetime...\n",
       "GEO_LON                    float64\n",
       "GEO_LAT                    float64\n",
       "NEIGHBORHOOD_ID           category\n",
       "IS_CRIME                     int64\n",
       "IS_TRAFFIC                   int64\n",
       "dtype: object"
      ]
     },
     "execution_count": 207,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime = pd.read_hdf('data/crime.h5', 'crime')\n",
    "crime.dtypes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 208,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>OFFENSE_TYPE_ID</th>\n",
       "      <th>OFFENSE_CATEGORY_ID</th>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th>...</th>\n",
       "      <th>NEIGHBORHOOD_ID</th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>300905</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>2016-05-1...</td>\n",
       "      <td>...</td>\n",
       "      <td>montbello</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>302354</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>2016-05-1...</td>\n",
       "      <td>...</td>\n",
       "      <td>west-hig...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>302373</th>\n",
       "      <td>fraud-id...</td>\n",
       "      <td>white-co...</td>\n",
       "      <td>2016-05-1...</td>\n",
       "      <td>...</td>\n",
       "      <td>hilltop</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>3 rows × 8 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       OFFENSE_TYPE_ID  ... IS_TRAFFIC\n",
       "300905  traffic-...     ...          1\n",
       "302354  traffic-...     ...          1\n",
       "302373  fraud-id...     ...          0"
      ]
     },
     "execution_count": 208,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(crime\n",
    "    [crime.REPORTED_DATE == '2016-05-12 16:45:00']\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 209,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>OFFENSE_TYPE_ID</th>\n",
       "      <th>OFFENSE_CATEGORY_ID</th>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th>...</th>\n",
       "      <th>NEIGHBORHOOD_ID</th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>0 rows × 8 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "Empty DataFrame\n",
       "Columns: [OFFENSE_TYPE_ID, OFFENSE_CATEGORY_ID, REPORTED_DATE, GEO_LON, GEO_LAT, NEIGHBORHOOD_ID, IS_CRIME, IS_TRAFFIC]\n",
       "Index: []"
      ]
     },
     "execution_count": 209,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(crime\n",
    "    [crime.REPORTED_DATE == '2016-05-12']\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 210,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>OFFENSE_TYPE_ID</th>\n",
       "      <th>OFFENSE_CATEGORY_ID</th>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th>...</th>\n",
       "      <th>NEIGHBORHOOD_ID</th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>0 rows × 8 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "Empty DataFrame\n",
       "Columns: [OFFENSE_TYPE_ID, OFFENSE_CATEGORY_ID, REPORTED_DATE, GEO_LON, GEO_LAT, NEIGHBORHOOD_ID, IS_CRIME, IS_TRAFFIC]\n",
       "Index: []"
      ]
     },
     "execution_count": 210,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(crime\n",
    "    [crime.REPORTED_DATE.dt.date == '2016-05-12']\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 211,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>OFFENSE_TYPE_ID</th>\n",
       "      <th>OFFENSE_CATEGORY_ID</th>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th>...</th>\n",
       "      <th>NEIGHBORHOOD_ID</th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>295715</th>\n",
       "      <td>criminal...</td>\n",
       "      <td>public-d...</td>\n",
       "      <td>2016-05-1...</td>\n",
       "      <td>...</td>\n",
       "      <td>athmar-park</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>296474</th>\n",
       "      <td>liquor-p...</td>\n",
       "      <td>drug-alc...</td>\n",
       "      <td>2016-05-1...</td>\n",
       "      <td>...</td>\n",
       "      <td>cbd</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>297204</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>2016-05-1...</td>\n",
       "      <td>...</td>\n",
       "      <td>stapleton</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>299383</th>\n",
       "      <td>theft-bi...</td>\n",
       "      <td>larceny</td>\n",
       "      <td>2016-05-1...</td>\n",
       "      <td>...</td>\n",
       "      <td>northeas...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>299389</th>\n",
       "      <td>theft-of...</td>\n",
       "      <td>auto-theft</td>\n",
       "      <td>2016-05-1...</td>\n",
       "      <td>...</td>\n",
       "      <td>elyria-s...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>358208</th>\n",
       "      <td>public-p...</td>\n",
       "      <td>public-d...</td>\n",
       "      <td>2016-05-1...</td>\n",
       "      <td>...</td>\n",
       "      <td>westwood</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>358448</th>\n",
       "      <td>threats-...</td>\n",
       "      <td>public-d...</td>\n",
       "      <td>2016-05-1...</td>\n",
       "      <td>...</td>\n",
       "      <td>clayton</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>363134</th>\n",
       "      <td>sex-aslt...</td>\n",
       "      <td>sexual-a...</td>\n",
       "      <td>2016-05-1...</td>\n",
       "      <td>...</td>\n",
       "      <td>harvey-p...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>365959</th>\n",
       "      <td>menacing...</td>\n",
       "      <td>aggravat...</td>\n",
       "      <td>2016-05-1...</td>\n",
       "      <td>...</td>\n",
       "      <td>hilltop</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>378711</th>\n",
       "      <td>assault-dv</td>\n",
       "      <td>other-cr...</td>\n",
       "      <td>2016-05-1...</td>\n",
       "      <td>...</td>\n",
       "      <td>north-ca...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>243 rows × 8 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       OFFENSE_TYPE_ID  ... IS_TRAFFIC\n",
       "295715  criminal...     ...          0\n",
       "296474  liquor-p...     ...          0\n",
       "297204  traffic-...     ...          1\n",
       "299383  theft-bi...     ...          0\n",
       "299389  theft-of...     ...          0\n",
       "...             ...     ...        ...\n",
       "358208  public-p...     ...          0\n",
       "358448  threats-...     ...          0\n",
       "363134  sex-aslt...     ...          0\n",
       "365959  menacing...     ...          0\n",
       "378711   assault-dv     ...          0"
      ]
     },
     "execution_count": 211,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(crime\n",
    "    [crime.REPORTED_DATE.between(\n",
    "         '2016-05-12', '2016-05-13')]\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 212,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(8012, 8)"
      ]
     },
     "execution_count": 212,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(crime\n",
    "    [crime.REPORTED_DATE.between(\n",
    "         '2016-05', '2016-06')]\n",
    "    .shape\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 213,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(91076, 8)"
      ]
     },
     "execution_count": 213,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(crime\n",
    "    [crime.REPORTED_DATE.between(\n",
    "         '2016', '2017')]\n",
    "    .shape\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 214,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(4, 8)"
      ]
     },
     "execution_count": 214,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(crime\n",
    "    [crime.REPORTED_DATE.between(\n",
    "         '2016-05-12 03', '2016-05-12 04')]\n",
    "    .shape\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 215,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(252, 8)"
      ]
     },
     "execution_count": 215,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(crime\n",
    "    [crime.REPORTED_DATE.between(\n",
    "         '2016 Sep, 15', '2016 Sep, 16')]\n",
    "    .shape\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 216,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(4, 8)"
      ]
     },
     "execution_count": 216,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(crime\n",
    "    [crime.REPORTED_DATE.between(\n",
    "         '21st October 2014 05', '21st October 2014 06')]\n",
    "    .shape\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 217,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(75176, 8)"
      ]
     },
     "execution_count": 217,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(crime\n",
    "    [crime.REPORTED_DATE.between(\n",
    "         '2015-3-4 22','2016-1-1 23:59:59')]\n",
    "    .shape\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 218,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(75071, 8)"
      ]
     },
     "execution_count": 218,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(crime\n",
    "    [crime.REPORTED_DATE.between(\n",
    "         '2015-3-4 22','2016-1-1 11:22:00')]\n",
    "    .shape\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### How it works..."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 219,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(75071, 8)"
      ]
     },
     "execution_count": 219,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "lmask = crime.REPORTED_DATE >= '2015-3-4 22'\n",
    "rmask = crime.REPORTED_DATE <= '2016-1-1 11:22:00'\n",
    "crime[lmask & rmask].shape"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### There's more..."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 220,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "14.6 ms ± 1.5 ms per loop (mean ± std. dev. of 7 runs, 100 loops each)\n"
     ]
    }
   ],
   "source": [
    "ctseries = crime.set_index('REPORTED_DATE')\n",
    "%timeit ctseries.loc['2015-3-4':'2016-1-1']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 221,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "34.1 ms ± 12.1 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)\n"
     ]
    }
   ],
   "source": [
    "%timeit crime[crime.REPORTED_DATE.between('2015-3-4','2016-1-1')]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Using methods that only work with a DatetimeIndex"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### How to do it..."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 222,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "pandas.core.indexes.datetimes.DatetimeIndex"
      ]
     },
     "execution_count": 222,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime = (pd.read_hdf('data/crime.h5', 'crime') \n",
    "    .set_index('REPORTED_DATE')\n",
    ")\n",
    "type(crime.index)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 223,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>OFFENSE_TYPE_ID</th>\n",
       "      <th>OFFENSE_CATEGORY_ID</th>\n",
       "      <th>GEO_LON</th>\n",
       "      <th>GEO_LAT</th>\n",
       "      <th>NEIGHBORHOOD_ID</th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2014-06-29 02:01:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-105.000149</td>\n",
       "      <td>39.745753</td>\n",
       "      <td>cbd</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014-06-29 02:00:00</th>\n",
       "      <td>disturbi...</td>\n",
       "      <td>public-d...</td>\n",
       "      <td>-105.020719</td>\n",
       "      <td>39.706674</td>\n",
       "      <td>athmar-park</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014-06-29 02:18:00</th>\n",
       "      <td>curfew</td>\n",
       "      <td>public-d...</td>\n",
       "      <td>-105.001552</td>\n",
       "      <td>39.769505</td>\n",
       "      <td>sunnyside</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014-06-29 04:17:00</th>\n",
       "      <td>aggravat...</td>\n",
       "      <td>aggravat...</td>\n",
       "      <td>-105.018557</td>\n",
       "      <td>39.679229</td>\n",
       "      <td>college-...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014-06-29 04:22:00</th>\n",
       "      <td>violatio...</td>\n",
       "      <td>all-othe...</td>\n",
       "      <td>-104.972447</td>\n",
       "      <td>39.739449</td>\n",
       "      <td>cheesman...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-08-25 04:41:00</th>\n",
       "      <td>theft-it...</td>\n",
       "      <td>theft-fr...</td>\n",
       "      <td>-104.880586</td>\n",
       "      <td>39.645164</td>\n",
       "      <td>hampden-...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-09-13 04:17:00</th>\n",
       "      <td>theft-of...</td>\n",
       "      <td>auto-theft</td>\n",
       "      <td>-105.028694</td>\n",
       "      <td>39.708288</td>\n",
       "      <td>westwood</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-09-13 02:21:00</th>\n",
       "      <td>assault-...</td>\n",
       "      <td>other-cr...</td>\n",
       "      <td>-104.925733</td>\n",
       "      <td>39.654184</td>\n",
       "      <td>universi...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-09-13 03:21:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-105.010711</td>\n",
       "      <td>39.757385</td>\n",
       "      <td>highland</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-09-13 02:15:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-105.043950</td>\n",
       "      <td>39.787436</td>\n",
       "      <td>regis</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>29078 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "             OFFENSE_TYPE_ID  ... IS_TRAFFIC\n",
       "REPORTED_...                  ...           \n",
       "2014-06-2...  traffic-...     ...          1\n",
       "2014-06-2...  disturbi...     ...          0\n",
       "2014-06-2...       curfew     ...          0\n",
       "2014-06-2...  aggravat...     ...          0\n",
       "2014-06-2...  violatio...     ...          0\n",
       "...                   ...     ...        ...\n",
       "2017-08-2...  theft-it...     ...          0\n",
       "2017-09-1...  theft-of...     ...          0\n",
       "2017-09-1...  assault-...     ...          0\n",
       "2017-09-1...  traffic-...     ...          1\n",
       "2017-09-1...  traffic-...     ...          1"
      ]
     },
     "execution_count": 223,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime.between_time('2:00', '5:00', include_end=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 224,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>OFFENSE_TYPE_ID</th>\n",
       "      <th>OFFENSE_CATEGORY_ID</th>\n",
       "      <th>GEO_LON</th>\n",
       "      <th>GEO_LAT</th>\n",
       "      <th>NEIGHBORHOOD_ID</th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2013-11-26 05:47:00</th>\n",
       "      <td>criminal...</td>\n",
       "      <td>public-d...</td>\n",
       "      <td>-104.991476</td>\n",
       "      <td>39.751536</td>\n",
       "      <td>cbd</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-04-09 05:47:00</th>\n",
       "      <td>criminal...</td>\n",
       "      <td>public-d...</td>\n",
       "      <td>-104.959394</td>\n",
       "      <td>39.678425</td>\n",
       "      <td>university</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-02-19 05:47:00</th>\n",
       "      <td>criminal...</td>\n",
       "      <td>public-d...</td>\n",
       "      <td>-104.986767</td>\n",
       "      <td>39.741336</td>\n",
       "      <td>north-ca...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-02-16 05:47:00</th>\n",
       "      <td>aggravat...</td>\n",
       "      <td>aggravat...</td>\n",
       "      <td>-104.934029</td>\n",
       "      <td>39.732320</td>\n",
       "      <td>hale</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-02-12 05:47:00</th>\n",
       "      <td>police-i...</td>\n",
       "      <td>all-othe...</td>\n",
       "      <td>-104.976306</td>\n",
       "      <td>39.722644</td>\n",
       "      <td>speer</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-09-10 05:47:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.986311</td>\n",
       "      <td>39.708426</td>\n",
       "      <td>washingt...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-03-14 05:47:00</th>\n",
       "      <td>theft-other</td>\n",
       "      <td>larceny</td>\n",
       "      <td>-105.047861</td>\n",
       "      <td>39.727237</td>\n",
       "      <td>villa-park</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-10-08 05:47:00</th>\n",
       "      <td>theft-it...</td>\n",
       "      <td>theft-fr...</td>\n",
       "      <td>-105.037308</td>\n",
       "      <td>39.768336</td>\n",
       "      <td>west-hig...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-08-21 05:47:00</th>\n",
       "      <td>theft-it...</td>\n",
       "      <td>theft-fr...</td>\n",
       "      <td>-105.021310</td>\n",
       "      <td>39.758076</td>\n",
       "      <td>jefferso...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-08-23 05:47:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.931056</td>\n",
       "      <td>39.702503</td>\n",
       "      <td>washingt...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>118 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "             OFFENSE_TYPE_ID  ... IS_TRAFFIC\n",
       "REPORTED_...                  ...           \n",
       "2013-11-2...  criminal...     ...          0\n",
       "2017-04-0...  criminal...     ...          0\n",
       "2017-02-1...  criminal...     ...          0\n",
       "2017-02-1...  aggravat...     ...          0\n",
       "2017-02-1...  police-i...     ...          0\n",
       "...                   ...     ...        ...\n",
       "2013-09-1...  traffic-...     ...          1\n",
       "2013-03-1...  theft-other     ...          0\n",
       "2012-10-0...  theft-it...     ...          0\n",
       "2013-08-2...  theft-it...     ...          0\n",
       "2017-08-2...  traffic-...     ...          1"
      ]
     },
     "execution_count": 224,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime.at_time('5:47')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 225,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>OFFENSE_TYPE_ID</th>\n",
       "      <th>OFFENSE_CATEGORY_ID</th>\n",
       "      <th>GEO_LON</th>\n",
       "      <th>GEO_LAT</th>\n",
       "      <th>NEIGHBORHOOD_ID</th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:06:00</th>\n",
       "      <td>aggravat...</td>\n",
       "      <td>aggravat...</td>\n",
       "      <td>-104.816860</td>\n",
       "      <td>39.796717</td>\n",
       "      <td>montbello</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:06:00</th>\n",
       "      <td>violatio...</td>\n",
       "      <td>all-othe...</td>\n",
       "      <td>-104.816860</td>\n",
       "      <td>39.796717</td>\n",
       "      <td>montbello</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:16:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.971851</td>\n",
       "      <td>39.736874</td>\n",
       "      <td>cheesman...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:47:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.951824</td>\n",
       "      <td>39.740168</td>\n",
       "      <td>congress...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 01:35:00</th>\n",
       "      <td>aggravat...</td>\n",
       "      <td>aggravat...</td>\n",
       "      <td>-104.998131</td>\n",
       "      <td>39.749922</td>\n",
       "      <td>union-st...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-06-30 23:40:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.922266</td>\n",
       "      <td>39.678471</td>\n",
       "      <td>goldsmith</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-06-30 23:44:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.987578</td>\n",
       "      <td>39.711158</td>\n",
       "      <td>baker</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-06-30 23:50:00</th>\n",
       "      <td>criminal...</td>\n",
       "      <td>public-d...</td>\n",
       "      <td>-104.838271</td>\n",
       "      <td>39.788683</td>\n",
       "      <td>montbello</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-06-30 23:54:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-105.014162</td>\n",
       "      <td>39.740439</td>\n",
       "      <td>lincoln-...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-07-01 00:01:00</th>\n",
       "      <td>robbery-...</td>\n",
       "      <td>robbery</td>\n",
       "      <td>-104.924292</td>\n",
       "      <td>39.767585</td>\n",
       "      <td>northeas...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>27489 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "             OFFENSE_TYPE_ID  ... IS_TRAFFIC\n",
       "REPORTED_...                  ...           \n",
       "2012-01-0...  aggravat...     ...          0\n",
       "2012-01-0...  violatio...     ...          0\n",
       "2012-01-0...  traffic-...     ...          1\n",
       "2012-01-0...  traffic-...     ...          1\n",
       "2012-01-0...  aggravat...     ...          0\n",
       "...                   ...     ...        ...\n",
       "2012-06-3...  traffic-...     ...          1\n",
       "2012-06-3...  traffic-...     ...          1\n",
       "2012-06-3...  criminal...     ...          0\n",
       "2012-06-3...  traffic-...     ...          1\n",
       "2012-07-0...  robbery-...     ...          0"
      ]
     },
     "execution_count": 225,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime_sort = crime.sort_index()\n",
    "crime_sort.first(pd.offsets.MonthBegin(6))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 226,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>OFFENSE_TYPE_ID</th>\n",
       "      <th>OFFENSE_CATEGORY_ID</th>\n",
       "      <th>GEO_LON</th>\n",
       "      <th>GEO_LAT</th>\n",
       "      <th>NEIGHBORHOOD_ID</th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:06:00</th>\n",
       "      <td>aggravat...</td>\n",
       "      <td>aggravat...</td>\n",
       "      <td>-104.816860</td>\n",
       "      <td>39.796717</td>\n",
       "      <td>montbello</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:06:00</th>\n",
       "      <td>violatio...</td>\n",
       "      <td>all-othe...</td>\n",
       "      <td>-104.816860</td>\n",
       "      <td>39.796717</td>\n",
       "      <td>montbello</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:16:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.971851</td>\n",
       "      <td>39.736874</td>\n",
       "      <td>cheesman...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:47:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.951824</td>\n",
       "      <td>39.740168</td>\n",
       "      <td>congress...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 01:35:00</th>\n",
       "      <td>aggravat...</td>\n",
       "      <td>aggravat...</td>\n",
       "      <td>-104.998131</td>\n",
       "      <td>39.749922</td>\n",
       "      <td>union-st...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-06-29 23:01:00</th>\n",
       "      <td>aggravat...</td>\n",
       "      <td>aggravat...</td>\n",
       "      <td>-105.019673</td>\n",
       "      <td>39.733250</td>\n",
       "      <td>sun-valley</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-06-29 23:11:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.918451</td>\n",
       "      <td>39.653080</td>\n",
       "      <td>southmoo...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-06-29 23:41:00</th>\n",
       "      <td>robbery-...</td>\n",
       "      <td>robbery</td>\n",
       "      <td>-104.991912</td>\n",
       "      <td>39.756163</td>\n",
       "      <td>five-points</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-06-29 23:57:00</th>\n",
       "      <td>assault-...</td>\n",
       "      <td>other-cr...</td>\n",
       "      <td>-104.987360</td>\n",
       "      <td>39.715162</td>\n",
       "      <td>speer</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-06-30 00:04:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.894697</td>\n",
       "      <td>39.628902</td>\n",
       "      <td>hampden-...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>27332 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "             OFFENSE_TYPE_ID  ... IS_TRAFFIC\n",
       "REPORTED_...                  ...           \n",
       "2012-01-0...  aggravat...     ...          0\n",
       "2012-01-0...  violatio...     ...          0\n",
       "2012-01-0...  traffic-...     ...          1\n",
       "2012-01-0...  traffic-...     ...          1\n",
       "2012-01-0...  aggravat...     ...          0\n",
       "...                   ...     ...        ...\n",
       "2012-06-2...  aggravat...     ...          0\n",
       "2012-06-2...  traffic-...     ...          1\n",
       "2012-06-2...  robbery-...     ...          0\n",
       "2012-06-2...  assault-...     ...          0\n",
       "2012-06-3...  traffic-...     ...          1"
      ]
     },
     "execution_count": 226,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime_sort.first(pd.offsets.MonthEnd(6))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 227,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>OFFENSE_TYPE_ID</th>\n",
       "      <th>OFFENSE_CATEGORY_ID</th>\n",
       "      <th>GEO_LON</th>\n",
       "      <th>GEO_LAT</th>\n",
       "      <th>NEIGHBORHOOD_ID</th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:06:00</th>\n",
       "      <td>aggravat...</td>\n",
       "      <td>aggravat...</td>\n",
       "      <td>-104.816860</td>\n",
       "      <td>39.796717</td>\n",
       "      <td>montbello</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:06:00</th>\n",
       "      <td>violatio...</td>\n",
       "      <td>all-othe...</td>\n",
       "      <td>-104.816860</td>\n",
       "      <td>39.796717</td>\n",
       "      <td>montbello</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:16:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.971851</td>\n",
       "      <td>39.736874</td>\n",
       "      <td>cheesman...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:47:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.951824</td>\n",
       "      <td>39.740168</td>\n",
       "      <td>congress...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 01:35:00</th>\n",
       "      <td>aggravat...</td>\n",
       "      <td>aggravat...</td>\n",
       "      <td>-104.998131</td>\n",
       "      <td>39.749922</td>\n",
       "      <td>union-st...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-06-30 23:40:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.922266</td>\n",
       "      <td>39.678471</td>\n",
       "      <td>goldsmith</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-06-30 23:40:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.922266</td>\n",
       "      <td>39.678471</td>\n",
       "      <td>goldsmith</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-06-30 23:44:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.987578</td>\n",
       "      <td>39.711158</td>\n",
       "      <td>baker</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-06-30 23:50:00</th>\n",
       "      <td>criminal...</td>\n",
       "      <td>public-d...</td>\n",
       "      <td>-104.838271</td>\n",
       "      <td>39.788683</td>\n",
       "      <td>montbello</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-06-30 23:54:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-105.014162</td>\n",
       "      <td>39.740439</td>\n",
       "      <td>lincoln-...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>27488 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "             OFFENSE_TYPE_ID  ... IS_TRAFFIC\n",
       "REPORTED_...                  ...           \n",
       "2012-01-0...  aggravat...     ...          0\n",
       "2012-01-0...  violatio...     ...          0\n",
       "2012-01-0...  traffic-...     ...          1\n",
       "2012-01-0...  traffic-...     ...          1\n",
       "2012-01-0...  aggravat...     ...          0\n",
       "...                   ...     ...        ...\n",
       "2012-06-3...  traffic-...     ...          1\n",
       "2012-06-3...  traffic-...     ...          1\n",
       "2012-06-3...  traffic-...     ...          1\n",
       "2012-06-3...  criminal...     ...          0\n",
       "2012-06-3...  traffic-...     ...          1"
      ]
     },
     "execution_count": 227,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime_sort.first(pd.offsets.MonthBegin(6, normalize=True))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 228,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>OFFENSE_TYPE_ID</th>\n",
       "      <th>OFFENSE_CATEGORY_ID</th>\n",
       "      <th>GEO_LON</th>\n",
       "      <th>GEO_LAT</th>\n",
       "      <th>NEIGHBORHOOD_ID</th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:06:00</th>\n",
       "      <td>aggravat...</td>\n",
       "      <td>aggravat...</td>\n",
       "      <td>-104.816860</td>\n",
       "      <td>39.796717</td>\n",
       "      <td>montbello</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:06:00</th>\n",
       "      <td>violatio...</td>\n",
       "      <td>all-othe...</td>\n",
       "      <td>-104.816860</td>\n",
       "      <td>39.796717</td>\n",
       "      <td>montbello</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:16:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.971851</td>\n",
       "      <td>39.736874</td>\n",
       "      <td>cheesman...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:47:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.951824</td>\n",
       "      <td>39.740168</td>\n",
       "      <td>congress...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 01:35:00</th>\n",
       "      <td>aggravat...</td>\n",
       "      <td>aggravat...</td>\n",
       "      <td>-104.998131</td>\n",
       "      <td>39.749922</td>\n",
       "      <td>union-st...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-06-30 23:40:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.922266</td>\n",
       "      <td>39.678471</td>\n",
       "      <td>goldsmith</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-06-30 23:40:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.922266</td>\n",
       "      <td>39.678471</td>\n",
       "      <td>goldsmith</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-06-30 23:44:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.987578</td>\n",
       "      <td>39.711158</td>\n",
       "      <td>baker</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-06-30 23:50:00</th>\n",
       "      <td>criminal...</td>\n",
       "      <td>public-d...</td>\n",
       "      <td>-104.838271</td>\n",
       "      <td>39.788683</td>\n",
       "      <td>montbello</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-06-30 23:54:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-105.014162</td>\n",
       "      <td>39.740439</td>\n",
       "      <td>lincoln-...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>27488 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "             OFFENSE_TYPE_ID  ... IS_TRAFFIC\n",
       "REPORTED_...                  ...           \n",
       "2012-01-0...  aggravat...     ...          0\n",
       "2012-01-0...  violatio...     ...          0\n",
       "2012-01-0...  traffic-...     ...          1\n",
       "2012-01-0...  traffic-...     ...          1\n",
       "2012-01-0...  aggravat...     ...          0\n",
       "...                   ...     ...        ...\n",
       "2012-06-3...  traffic-...     ...          1\n",
       "2012-06-3...  traffic-...     ...          1\n",
       "2012-06-3...  traffic-...     ...          1\n",
       "2012-06-3...  criminal...     ...          0\n",
       "2012-06-3...  traffic-...     ...          1"
      ]
     },
     "execution_count": 228,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime_sort.loc[:'2012-06']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 229,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>OFFENSE_TYPE_ID</th>\n",
       "      <th>OFFENSE_CATEGORY_ID</th>\n",
       "      <th>GEO_LON</th>\n",
       "      <th>GEO_LAT</th>\n",
       "      <th>NEIGHBORHOOD_ID</th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:06:00</th>\n",
       "      <td>aggravat...</td>\n",
       "      <td>aggravat...</td>\n",
       "      <td>-104.816860</td>\n",
       "      <td>39.796717</td>\n",
       "      <td>montbello</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:06:00</th>\n",
       "      <td>violatio...</td>\n",
       "      <td>all-othe...</td>\n",
       "      <td>-104.816860</td>\n",
       "      <td>39.796717</td>\n",
       "      <td>montbello</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:16:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.971851</td>\n",
       "      <td>39.736874</td>\n",
       "      <td>cheesman...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:47:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.951824</td>\n",
       "      <td>39.740168</td>\n",
       "      <td>congress...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 01:35:00</th>\n",
       "      <td>aggravat...</td>\n",
       "      <td>aggravat...</td>\n",
       "      <td>-104.998131</td>\n",
       "      <td>39.749922</td>\n",
       "      <td>union-st...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-06 23:11:00</th>\n",
       "      <td>theft-it...</td>\n",
       "      <td>theft-fr...</td>\n",
       "      <td>-104.999752</td>\n",
       "      <td>39.726081</td>\n",
       "      <td>lincoln-...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-06 23:23:00</th>\n",
       "      <td>violatio...</td>\n",
       "      <td>all-othe...</td>\n",
       "      <td>-104.969588</td>\n",
       "      <td>39.681135</td>\n",
       "      <td>university</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-06 23:30:00</th>\n",
       "      <td>assault-dv</td>\n",
       "      <td>other-cr...</td>\n",
       "      <td>-104.958983</td>\n",
       "      <td>39.674135</td>\n",
       "      <td>universi...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-06 23:44:00</th>\n",
       "      <td>theft-of...</td>\n",
       "      <td>auto-theft</td>\n",
       "      <td>-104.845356</td>\n",
       "      <td>39.794035</td>\n",
       "      <td>montbello</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-06 23:55:00</th>\n",
       "      <td>threats-...</td>\n",
       "      <td>public-d...</td>\n",
       "      <td>-105.004788</td>\n",
       "      <td>39.708714</td>\n",
       "      <td>athmar-park</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>605 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "             OFFENSE_TYPE_ID  ... IS_TRAFFIC\n",
       "REPORTED_...                  ...           \n",
       "2012-01-0...  aggravat...     ...          0\n",
       "2012-01-0...  violatio...     ...          0\n",
       "2012-01-0...  traffic-...     ...          1\n",
       "2012-01-0...  traffic-...     ...          1\n",
       "2012-01-0...  aggravat...     ...          0\n",
       "...                   ...     ...        ...\n",
       "2012-01-0...  theft-it...     ...          0\n",
       "2012-01-0...  violatio...     ...          0\n",
       "2012-01-0...   assault-dv     ...          0\n",
       "2012-01-0...  theft-of...     ...          0\n",
       "2012-01-0...  threats-...     ...          0"
      ]
     },
     "execution_count": 229,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime_sort.first('5D') # 5 days"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 230,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>OFFENSE_TYPE_ID</th>\n",
       "      <th>OFFENSE_CATEGORY_ID</th>\n",
       "      <th>GEO_LON</th>\n",
       "      <th>GEO_LAT</th>\n",
       "      <th>NEIGHBORHOOD_ID</th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:06:00</th>\n",
       "      <td>aggravat...</td>\n",
       "      <td>aggravat...</td>\n",
       "      <td>-104.816860</td>\n",
       "      <td>39.796717</td>\n",
       "      <td>montbello</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:06:00</th>\n",
       "      <td>violatio...</td>\n",
       "      <td>all-othe...</td>\n",
       "      <td>-104.816860</td>\n",
       "      <td>39.796717</td>\n",
       "      <td>montbello</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:16:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.971851</td>\n",
       "      <td>39.736874</td>\n",
       "      <td>cheesman...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:47:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.951824</td>\n",
       "      <td>39.740168</td>\n",
       "      <td>congress...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 01:35:00</th>\n",
       "      <td>aggravat...</td>\n",
       "      <td>aggravat...</td>\n",
       "      <td>-104.998131</td>\n",
       "      <td>39.749922</td>\n",
       "      <td>union-st...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-08 23:46:00</th>\n",
       "      <td>theft-it...</td>\n",
       "      <td>theft-fr...</td>\n",
       "      <td>-104.991384</td>\n",
       "      <td>39.753888</td>\n",
       "      <td>five-points</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-08 23:51:00</th>\n",
       "      <td>burglary...</td>\n",
       "      <td>burglary</td>\n",
       "      <td>-105.031781</td>\n",
       "      <td>39.747420</td>\n",
       "      <td>sloan-lake</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-08 23:52:00</th>\n",
       "      <td>theft-other</td>\n",
       "      <td>larceny</td>\n",
       "      <td>-104.968227</td>\n",
       "      <td>39.739752</td>\n",
       "      <td>cheesman...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-09 00:04:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.973343</td>\n",
       "      <td>39.760757</td>\n",
       "      <td>five-points</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-09 00:05:00</th>\n",
       "      <td>fraud-cr...</td>\n",
       "      <td>white-co...</td>\n",
       "      <td>-105.024676</td>\n",
       "      <td>39.712702</td>\n",
       "      <td>valverde</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>879 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "             OFFENSE_TYPE_ID  ... IS_TRAFFIC\n",
       "REPORTED_...                  ...           \n",
       "2012-01-0...  aggravat...     ...          0\n",
       "2012-01-0...  violatio...     ...          0\n",
       "2012-01-0...  traffic-...     ...          1\n",
       "2012-01-0...  traffic-...     ...          1\n",
       "2012-01-0...  aggravat...     ...          0\n",
       "...                   ...     ...        ...\n",
       "2012-01-0...  theft-it...     ...          0\n",
       "2012-01-0...  burglary...     ...          0\n",
       "2012-01-0...  theft-other     ...          0\n",
       "2012-01-0...  traffic-...     ...          1\n",
       "2012-01-0...  fraud-cr...     ...          0"
      ]
     },
     "execution_count": 230,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime_sort.first('5B') # 5 business days"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 231,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>OFFENSE_TYPE_ID</th>\n",
       "      <th>OFFENSE_CATEGORY_ID</th>\n",
       "      <th>GEO_LON</th>\n",
       "      <th>GEO_LAT</th>\n",
       "      <th>NEIGHBORHOOD_ID</th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:06:00</th>\n",
       "      <td>aggravat...</td>\n",
       "      <td>aggravat...</td>\n",
       "      <td>-104.816860</td>\n",
       "      <td>39.796717</td>\n",
       "      <td>montbello</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:06:00</th>\n",
       "      <td>violatio...</td>\n",
       "      <td>all-othe...</td>\n",
       "      <td>-104.816860</td>\n",
       "      <td>39.796717</td>\n",
       "      <td>montbello</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:16:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.971851</td>\n",
       "      <td>39.736874</td>\n",
       "      <td>cheesman...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:47:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.951824</td>\n",
       "      <td>39.740168</td>\n",
       "      <td>congress...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 01:35:00</th>\n",
       "      <td>aggravat...</td>\n",
       "      <td>aggravat...</td>\n",
       "      <td>-104.998131</td>\n",
       "      <td>39.749922</td>\n",
       "      <td>union-st...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-02-18 21:57:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.974663</td>\n",
       "      <td>39.744041</td>\n",
       "      <td>north-ca...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-02-18 22:19:00</th>\n",
       "      <td>criminal...</td>\n",
       "      <td>public-d...</td>\n",
       "      <td>-104.957558</td>\n",
       "      <td>39.766129</td>\n",
       "      <td>clayton</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-02-18 22:20:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.919946</td>\n",
       "      <td>39.761917</td>\n",
       "      <td>north-pa...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-02-18 22:44:00</th>\n",
       "      <td>criminal...</td>\n",
       "      <td>public-d...</td>\n",
       "      <td>-105.044984</td>\n",
       "      <td>39.736776</td>\n",
       "      <td>west-colfax</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-02-18 23:27:00</th>\n",
       "      <td>theft-it...</td>\n",
       "      <td>theft-fr...</td>\n",
       "      <td>-105.009018</td>\n",
       "      <td>39.708701</td>\n",
       "      <td>athmar-park</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>6708 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "             OFFENSE_TYPE_ID  ... IS_TRAFFIC\n",
       "REPORTED_...                  ...           \n",
       "2012-01-0...  aggravat...     ...          0\n",
       "2012-01-0...  violatio...     ...          0\n",
       "2012-01-0...  traffic-...     ...          1\n",
       "2012-01-0...  traffic-...     ...          1\n",
       "2012-01-0...  aggravat...     ...          0\n",
       "...                   ...     ...        ...\n",
       "2012-02-1...  traffic-...     ...          1\n",
       "2012-02-1...  criminal...     ...          0\n",
       "2012-02-1...  traffic-...     ...          1\n",
       "2012-02-1...  criminal...     ...          0\n",
       "2012-02-1...  theft-it...     ...          0"
      ]
     },
     "execution_count": 231,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime_sort.first('7W') # 7 weeks, with weeks ending on Sunday"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 232,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>OFFENSE_TYPE_ID</th>\n",
       "      <th>OFFENSE_CATEGORY_ID</th>\n",
       "      <th>GEO_LON</th>\n",
       "      <th>GEO_LAT</th>\n",
       "      <th>NEIGHBORHOOD_ID</th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:06:00</th>\n",
       "      <td>aggravat...</td>\n",
       "      <td>aggravat...</td>\n",
       "      <td>-104.816860</td>\n",
       "      <td>39.796717</td>\n",
       "      <td>montbello</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:06:00</th>\n",
       "      <td>violatio...</td>\n",
       "      <td>all-othe...</td>\n",
       "      <td>-104.816860</td>\n",
       "      <td>39.796717</td>\n",
       "      <td>montbello</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:16:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.971851</td>\n",
       "      <td>39.736874</td>\n",
       "      <td>cheesman...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:47:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.951824</td>\n",
       "      <td>39.740168</td>\n",
       "      <td>congress...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 01:35:00</th>\n",
       "      <td>aggravat...</td>\n",
       "      <td>aggravat...</td>\n",
       "      <td>-104.998131</td>\n",
       "      <td>39.749922</td>\n",
       "      <td>union-st...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-09-30 23:17:00</th>\n",
       "      <td>drug-hal...</td>\n",
       "      <td>drug-alc...</td>\n",
       "      <td>-105.022715</td>\n",
       "      <td>39.678579</td>\n",
       "      <td>college-...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-09-30 23:29:00</th>\n",
       "      <td>robbery-...</td>\n",
       "      <td>robbery</td>\n",
       "      <td>-104.977522</td>\n",
       "      <td>39.781310</td>\n",
       "      <td>globeville</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-09-30 23:29:00</th>\n",
       "      <td>theft-of...</td>\n",
       "      <td>auto-theft</td>\n",
       "      <td>-104.988838</td>\n",
       "      <td>39.686925</td>\n",
       "      <td>overland</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-09-30 23:41:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-105.087598</td>\n",
       "      <td>39.638462</td>\n",
       "      <td>marston</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-09-30 23:43:00</th>\n",
       "      <td>robbery-...</td>\n",
       "      <td>robbery</td>\n",
       "      <td>-104.772712</td>\n",
       "      <td>39.781966</td>\n",
       "      <td>gateway-...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>43045 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "             OFFENSE_TYPE_ID  ... IS_TRAFFIC\n",
       "REPORTED_...                  ...           \n",
       "2012-01-0...  aggravat...     ...          0\n",
       "2012-01-0...  violatio...     ...          0\n",
       "2012-01-0...  traffic-...     ...          1\n",
       "2012-01-0...  traffic-...     ...          1\n",
       "2012-01-0...  aggravat...     ...          0\n",
       "...                   ...     ...        ...\n",
       "2012-09-3...  drug-hal...     ...          0\n",
       "2012-09-3...  robbery-...     ...          0\n",
       "2012-09-3...  theft-of...     ...          0\n",
       "2012-09-3...  traffic-...     ...          1\n",
       "2012-09-3...  robbery-...     ...          0"
      ]
     },
     "execution_count": 232,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime_sort.first('3QS') # 3rd quarter start"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 233,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>OFFENSE_TYPE_ID</th>\n",
       "      <th>OFFENSE_CATEGORY_ID</th>\n",
       "      <th>GEO_LON</th>\n",
       "      <th>GEO_LAT</th>\n",
       "      <th>NEIGHBORHOOD_ID</th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:06:00</th>\n",
       "      <td>aggravat...</td>\n",
       "      <td>aggravat...</td>\n",
       "      <td>-104.816860</td>\n",
       "      <td>39.796717</td>\n",
       "      <td>montbello</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:06:00</th>\n",
       "      <td>violatio...</td>\n",
       "      <td>all-othe...</td>\n",
       "      <td>-104.816860</td>\n",
       "      <td>39.796717</td>\n",
       "      <td>montbello</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:16:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.971851</td>\n",
       "      <td>39.736874</td>\n",
       "      <td>cheesman...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 00:47:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.951824</td>\n",
       "      <td>39.740168</td>\n",
       "      <td>congress...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-01-02 01:35:00</th>\n",
       "      <td>aggravat...</td>\n",
       "      <td>aggravat...</td>\n",
       "      <td>-104.998131</td>\n",
       "      <td>39.749922</td>\n",
       "      <td>union-st...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-12-30 23:13:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-104.973097</td>\n",
       "      <td>39.740032</td>\n",
       "      <td>capitol-...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-12-30 23:14:00</th>\n",
       "      <td>burglary...</td>\n",
       "      <td>burglary</td>\n",
       "      <td>-104.960898</td>\n",
       "      <td>39.697153</td>\n",
       "      <td>washingt...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-12-30 23:39:00</th>\n",
       "      <td>theft-of...</td>\n",
       "      <td>auto-theft</td>\n",
       "      <td>-105.002180</td>\n",
       "      <td>39.769714</td>\n",
       "      <td>sunnyside</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-12-30 23:41:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-105.024681</td>\n",
       "      <td>39.673642</td>\n",
       "      <td>college-...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-12-31 00:05:00</th>\n",
       "      <td>assault-...</td>\n",
       "      <td>other-cr...</td>\n",
       "      <td>-104.985759</td>\n",
       "      <td>39.732297</td>\n",
       "      <td>capitol-...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>56897 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "             OFFENSE_TYPE_ID  ... IS_TRAFFIC\n",
       "REPORTED_...                  ...           \n",
       "2012-01-0...  aggravat...     ...          0\n",
       "2012-01-0...  violatio...     ...          0\n",
       "2012-01-0...  traffic-...     ...          1\n",
       "2012-01-0...  traffic-...     ...          1\n",
       "2012-01-0...  aggravat...     ...          0\n",
       "...                   ...     ...        ...\n",
       "2012-12-3...  traffic-...     ...          1\n",
       "2012-12-3...  burglary...     ...          0\n",
       "2012-12-3...  theft-of...     ...          0\n",
       "2012-12-3...  traffic-...     ...          1\n",
       "2012-12-3...  assault-...     ...          0"
      ]
     },
     "execution_count": 233,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime_sort.first('A') # one year end"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### How it works..."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 234,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>OFFENSE_TYPE_ID</th>\n",
       "      <th>OFFENSE_CATEGORY_ID</th>\n",
       "      <th>GEO_LON</th>\n",
       "      <th>GEO_LAT</th>\n",
       "      <th>NEIGHBORHOOD_ID</th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2014-06-29 02:01:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-105.000149</td>\n",
       "      <td>39.745753</td>\n",
       "      <td>cbd</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014-06-29 02:00:00</th>\n",
       "      <td>disturbi...</td>\n",
       "      <td>public-d...</td>\n",
       "      <td>-105.020719</td>\n",
       "      <td>39.706674</td>\n",
       "      <td>athmar-park</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014-06-29 02:18:00</th>\n",
       "      <td>curfew</td>\n",
       "      <td>public-d...</td>\n",
       "      <td>-105.001552</td>\n",
       "      <td>39.769505</td>\n",
       "      <td>sunnyside</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014-06-29 04:17:00</th>\n",
       "      <td>aggravat...</td>\n",
       "      <td>aggravat...</td>\n",
       "      <td>-105.018557</td>\n",
       "      <td>39.679229</td>\n",
       "      <td>college-...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014-06-29 04:22:00</th>\n",
       "      <td>violatio...</td>\n",
       "      <td>all-othe...</td>\n",
       "      <td>-104.972447</td>\n",
       "      <td>39.739449</td>\n",
       "      <td>cheesman...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-08-25 04:41:00</th>\n",
       "      <td>theft-it...</td>\n",
       "      <td>theft-fr...</td>\n",
       "      <td>-104.880586</td>\n",
       "      <td>39.645164</td>\n",
       "      <td>hampden-...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-09-13 04:17:00</th>\n",
       "      <td>theft-of...</td>\n",
       "      <td>auto-theft</td>\n",
       "      <td>-105.028694</td>\n",
       "      <td>39.708288</td>\n",
       "      <td>westwood</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-09-13 02:21:00</th>\n",
       "      <td>assault-...</td>\n",
       "      <td>other-cr...</td>\n",
       "      <td>-104.925733</td>\n",
       "      <td>39.654184</td>\n",
       "      <td>universi...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-09-13 03:21:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-105.010711</td>\n",
       "      <td>39.757385</td>\n",
       "      <td>highland</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-09-13 02:15:00</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>-105.043950</td>\n",
       "      <td>39.787436</td>\n",
       "      <td>regis</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>29078 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "             OFFENSE_TYPE_ID  ... IS_TRAFFIC\n",
       "REPORTED_...                  ...           \n",
       "2014-06-2...  traffic-...     ...          1\n",
       "2014-06-2...  disturbi...     ...          0\n",
       "2014-06-2...       curfew     ...          0\n",
       "2014-06-2...  aggravat...     ...          0\n",
       "2014-06-2...  violatio...     ...          0\n",
       "...                   ...     ...        ...\n",
       "2017-08-2...  theft-it...     ...          0\n",
       "2017-09-1...  theft-of...     ...          0\n",
       "2017-09-1...  assault-...     ...          0\n",
       "2017-09-1...  traffic-...     ...          1\n",
       "2017-09-1...  traffic-...     ...          1"
      ]
     },
     "execution_count": 234,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import datetime\n",
    "crime.between_time(datetime.time(2,0), datetime.time(5,0),\n",
    "                   include_end=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 235,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('2012-01-02 00:06:00')"
      ]
     },
     "execution_count": 235,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "first_date = crime_sort.index[0]\n",
    "first_date"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 236,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('2012-07-01 00:06:00')"
      ]
     },
     "execution_count": 236,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "first_date + pd.offsets.MonthBegin(6)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 237,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('2012-06-30 00:06:00')"
      ]
     },
     "execution_count": 237,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "first_date + pd.offsets.MonthEnd(6)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 238,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 238,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "step4 = crime_sort.first(pd.offsets.MonthEnd(6))\n",
    "end_dt = crime_sort.index[0] + pd.offsets.MonthEnd(6)\n",
    "step4_internal = crime_sort[:end_dt]\n",
    "step4.equals(step4_internal)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### There's more..."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 239,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('2012-02-16 13:40:00')"
      ]
     },
     "execution_count": 239,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dt = pd.Timestamp('2012-1-16 13:40')\n",
    "dt + pd.DateOffset(months=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 240,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('2014-06-25 11:22:10')"
      ]
     },
     "execution_count": 240,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "do = pd.DateOffset(years=2, months=5, days=3,\n",
    "    hours=8, seconds=10)\n",
    "pd.Timestamp('2012-1-22 03:22') + do"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Counting the number of weekly crimes"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### How to do it..."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 241,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [],
   "source": [
    "crime_sort = (pd.read_hdf('data/crime.h5', 'crime') \n",
    "    .set_index('REPORTED_DATE') \n",
    "    .sort_index()\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 242,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<pandas.core.resample.DatetimeIndexResampler object at 0x11d920ef0>"
      ]
     },
     "execution_count": 242,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime_sort.resample('W')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 243,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "REPORTED_DATE\n",
       "2012-01-08     877\n",
       "2012-01-15    1071\n",
       "2012-01-22     991\n",
       "2012-01-29     988\n",
       "2012-02-05     888\n",
       "              ... \n",
       "2017-09-03    1956\n",
       "2017-09-10    1733\n",
       "2017-09-17    1976\n",
       "2017-09-24    1839\n",
       "2017-10-01    1059\n",
       "Freq: W-SUN, Length: 300, dtype: int64"
      ]
     },
     "execution_count": 243,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(crime_sort\n",
    "    .resample('W')\n",
    "    .size()\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 244,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "877"
      ]
     },
     "execution_count": 244,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(crime_sort.loc[:'2012-1-8'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 245,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1071"
      ]
     },
     "execution_count": 245,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(crime_sort.loc['2012-1-9':'2012-1-15'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 246,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "REPORTED_DATE\n",
       "2012-01-05     462\n",
       "2012-01-12    1116\n",
       "2012-01-19     924\n",
       "2012-01-26    1061\n",
       "2012-02-02     926\n",
       "              ... \n",
       "2017-09-07    1803\n",
       "2017-09-14    1866\n",
       "2017-09-21    1926\n",
       "2017-09-28    1720\n",
       "2017-10-05      28\n",
       "Freq: W-THU, Length: 301, dtype: int64"
      ]
     },
     "execution_count": 246,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(crime_sort\n",
    "    .resample('W-THU')\n",
    "    .size()\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 247,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "REPORTED_DATE\n",
       "2012-01-08     877\n",
       "2012-01-15    1071\n",
       "2012-01-22     991\n",
       "2012-01-29     988\n",
       "2012-02-05     888\n",
       "              ... \n",
       "2017-09-03    1956\n",
       "2017-09-10    1733\n",
       "2017-09-17    1976\n",
       "2017-09-24    1839\n",
       "2017-10-01    1059\n",
       "Freq: W-SUN, Length: 300, dtype: int64"
      ]
     },
     "execution_count": 247,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "weekly_crimes = (crime_sort\n",
    "    .groupby(pd.Grouper(freq='W')) \n",
    "    .size()\n",
    ")\n",
    "weekly_crimes"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### How it works..."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 248,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['agg',\n",
       " 'aggregate',\n",
       " 'apply',\n",
       " 'asfreq',\n",
       " 'ax',\n",
       " 'backfill',\n",
       " 'bfill',\n",
       " 'count',\n",
       " 'ffill',\n",
       " 'fillna',\n",
       " 'first',\n",
       " 'get_group',\n",
       " 'groups',\n",
       " 'indices',\n",
       " 'interpolate',\n",
       " 'last',\n",
       " 'max',\n",
       " 'mean',\n",
       " 'median',\n",
       " 'min',\n",
       " 'ndim',\n",
       " 'nearest',\n",
       " 'ngroups',\n",
       " 'nunique',\n",
       " 'obj',\n",
       " 'ohlc',\n",
       " 'pad',\n",
       " 'pipe',\n",
       " 'plot',\n",
       " 'prod',\n",
       " 'quantile',\n",
       " 'sem',\n",
       " 'size',\n",
       " 'std',\n",
       " 'sum',\n",
       " 'transform',\n",
       " 'var']"
      ]
     },
     "execution_count": 248,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r = crime_sort.resample('W')\n",
    "[attr for attr in dir(r) if attr[0].islower()]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### There's more..."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 249,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 249,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime = pd.read_hdf('data/crime.h5', 'crime')\n",
    "weekly_crimes2 = crime.resample('W', on='REPORTED_DATE').size()\n",
    "weekly_crimes2.equals(weekly_crimes)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 250,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 250,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "weekly_crimes_gby2 = (crime\n",
    "    .groupby(pd.Grouper(key='REPORTED_DATE', freq='W'))\n",
    "    .size()\n",
    ")\n",
    "weekly_crimes2.equals(weekly_crimes)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 251,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA64AAAEXCAYAAACtXBnmAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi40LCBodHRwOi8vbWF0cGxvdGxpYi5vcmcv7US4rQAAIABJREFUeJzs3Xd4m/W5P/73R8satpb3dmxn70nYs1AKp0AXhVLo6TrflrannM5zOKf8ujdt6YQCpbSUtlBoWspeIYuEJM6O43jvIVl7j8/vj2dYsiVbUuQRcr+uKxeOLEuPiSw/93MvxjkHIYQQQgghhBCyUCnm+wAIIYQQQgghhJDpUOBKCCGEEEIIIWRBo8CVEEIIIYQQQsiCRoErIYQQQgghhJAFjQJXQgghhBBCCCELGgWuhBBCCCGEEEIWNApcCSGEvC0xxh5hjH1L/Pgyxlj/fB/TQsIY8zLGGuf7OAghhJBMUOBKCCHkrMYYe50x5mCMFZzBY3DGmE8M5uyMsVcYYzfn8zhnE2OskjH2EGNsiDHmYYy1Msa+zhgzpPsaznkh57xzLo+TEEIIyRUFroQQQs5ajLEGABcD4ADefYYPt5ZzXghgKYBHAPyCMXbPGT5mXjHGVCluswLYA0AH4HzOeRGAdwAwA2jK5DEIIYSQhY4CV0IIIWez2wG8CSHQvCMfD8g5t3HO/wDgUwD+mzFWDACMMVNCVnOAMfYtxphS/NxHGGM7GWM/ErO/XYyxa8XP3cwY25/4HIyxuxhj/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59l/LzNYAT5lZh7u/HB5bDqQCG8wsx93b3H1jeFsl8M/xr0eY+P6pu/9imMcUEREZM5pxFRGR89GbQPk53uc1YJGZLQIuAr4Vd9s3gYvNbGH8Hdy9F/jdKB5rUO5eC9wJ3GVmluB9toXx3RV3+HPAT4EXgduTEZuIiMhYUuIqIiLnlXAW9Frg6bjDC88q090wyF0/AWwHVgDbwqQU6E9QtwErz3qsTGAd8HwCoW04K4aFg53k7vsJZktnJnDNmC3Asrif/x3wBPA4QRKbiL+Ni+2xc3hsERGRj0ylwiIicr7IMrNtBLOfHxCU8MYMVyr8qpn1Au8B9wFXJfBYC8PHmg884+7vJXCfoUqFk6F/dtbMLgbq3P2QmdUAD5nZDHdvGOEaKhUWEZEJoxlXERE5X8TWilYQJHIbE7zfx919jbt/0d2bgJ3AmvgGSeH3a8Lb4HQivBC4yMxuS9aTMLMFQC9Qew53u5AgWYdghnWZmR0E9hGsl/2DZMUnIiIyFpS4iojIecXd2wkaLH3NzM658sjd9wJbCWZfY+4DtoS3xZ9bB9wD/PnoIz7NzEqAHwDfc3dP8D4XAP8deCBMsD8DrHb3SnevJFjjmmi5sIiIyIRQ4ioiIucdd99KUPobS9jOXuN69wiX+DKwJNwKZx+wJDw2mKeA7CHWzcY7e43rp8LjWbHtcIB/IWiodH8C19pqZruBB4C7w47CG4Aadz8Sd+5rwAozKx3hmn97VnzpI5wvIiKSNJbgB7YiIiIiIiIiE0IzriIiIiIiIhJp6iosIiIyCZnZjcDfnHX4gLv//kTEIyIiMpZUKiwiIiIiIiKRplJhERERERERiTQlriIiIiIiIhJpSlxFREREREQk0pS4ioiIiIiISKT9f9zUs3TvHclCAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 1152x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "fig, ax = plt.subplots(figsize=(16, 4))\n",
    "weekly_crimes.plot(title='All Denver Crimes', ax=ax)\n",
    "fig.savefig('/tmp/c12-crimes.png', dpi=300)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Aggregating weekly crime and traffic accidents separately"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### How to do it..."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 252,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [],
   "source": [
    "crime = (pd.read_hdf('data/crime.h5', 'crime') \n",
    "    .set_index('REPORTED_DATE') \n",
    "    .sort_index()\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 253,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2012-03-31</th>\n",
       "      <td>7882</td>\n",
       "      <td>4726</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-06-30</th>\n",
       "      <td>9641</td>\n",
       "      <td>5255</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-09-30</th>\n",
       "      <td>10566</td>\n",
       "      <td>5003</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-12-31</th>\n",
       "      <td>9197</td>\n",
       "      <td>4802</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-03-31</th>\n",
       "      <td>8730</td>\n",
       "      <td>4442</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-09-30</th>\n",
       "      <td>17427</td>\n",
       "      <td>6199</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-12-31</th>\n",
       "      <td>15984</td>\n",
       "      <td>6094</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-03-31</th>\n",
       "      <td>16426</td>\n",
       "      <td>5587</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-06-30</th>\n",
       "      <td>17486</td>\n",
       "      <td>6148</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-09-30</th>\n",
       "      <td>17990</td>\n",
       "      <td>6101</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>23 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "              IS_CRIME  IS_TRAFFIC\n",
       "REPORTED_...                      \n",
       "2012-03-31        7882        4726\n",
       "2012-06-30        9641        5255\n",
       "2012-09-30       10566        5003\n",
       "2012-12-31        9197        4802\n",
       "2013-03-31        8730        4442\n",
       "...                ...         ...\n",
       "2016-09-30       17427        6199\n",
       "2016-12-31       15984        6094\n",
       "2017-03-31       16426        5587\n",
       "2017-06-30       17486        6148\n",
       "2017-09-30       17990        6101"
      ]
     },
     "execution_count": 253,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(crime\n",
    "    .resample('Q')\n",
    "    ['IS_CRIME', 'IS_TRAFFIC']\n",
    "    .sum()\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 254,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2012-01-01</th>\n",
       "      <td>7882</td>\n",
       "      <td>4726</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-04-01</th>\n",
       "      <td>9641</td>\n",
       "      <td>5255</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-07-01</th>\n",
       "      <td>10566</td>\n",
       "      <td>5003</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-10-01</th>\n",
       "      <td>9197</td>\n",
       "      <td>4802</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-01-01</th>\n",
       "      <td>8730</td>\n",
       "      <td>4442</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-07-01</th>\n",
       "      <td>17427</td>\n",
       "      <td>6199</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-10-01</th>\n",
       "      <td>15984</td>\n",
       "      <td>6094</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-01-01</th>\n",
       "      <td>16426</td>\n",
       "      <td>5587</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-04-01</th>\n",
       "      <td>17486</td>\n",
       "      <td>6148</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-07-01</th>\n",
       "      <td>17990</td>\n",
       "      <td>6101</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>23 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "              IS_CRIME  IS_TRAFFIC\n",
       "REPORTED_...                      \n",
       "2012-01-01        7882        4726\n",
       "2012-04-01        9641        5255\n",
       "2012-07-01       10566        5003\n",
       "2012-10-01        9197        4802\n",
       "2013-01-01        8730        4442\n",
       "...                ...         ...\n",
       "2016-07-01       17427        6199\n",
       "2016-10-01       15984        6094\n",
       "2017-01-01       16426        5587\n",
       "2017-04-01       17486        6148\n",
       "2017-07-01       17990        6101"
      ]
     },
     "execution_count": 254,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(crime\n",
    "    .resample('QS')\n",
    "    ['IS_CRIME', 'IS_TRAFFIC']\n",
    "    .sum()\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 255,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "IS_CRIME      9641\n",
       "IS_TRAFFIC    5255\n",
       "dtype: int64"
      ]
     },
     "execution_count": 255,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(crime\n",
    "   .loc['2012-4-1':'2012-6-30', ['IS_CRIME', 'IS_TRAFFIC']]\n",
    "   .sum()\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 256,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2012-03-31</th>\n",
       "      <td>7882</td>\n",
       "      <td>4726</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-06-30</th>\n",
       "      <td>9641</td>\n",
       "      <td>5255</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-09-30</th>\n",
       "      <td>10566</td>\n",
       "      <td>5003</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-12-31</th>\n",
       "      <td>9197</td>\n",
       "      <td>4802</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-03-31</th>\n",
       "      <td>8730</td>\n",
       "      <td>4442</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-09-30</th>\n",
       "      <td>17427</td>\n",
       "      <td>6199</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-12-31</th>\n",
       "      <td>15984</td>\n",
       "      <td>6094</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-03-31</th>\n",
       "      <td>16426</td>\n",
       "      <td>5587</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-06-30</th>\n",
       "      <td>17486</td>\n",
       "      <td>6148</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-09-30</th>\n",
       "      <td>17990</td>\n",
       "      <td>6101</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>23 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "              IS_CRIME  IS_TRAFFIC\n",
       "REPORTED_...                      \n",
       "2012-03-31        7882        4726\n",
       "2012-06-30        9641        5255\n",
       "2012-09-30       10566        5003\n",
       "2012-12-31        9197        4802\n",
       "2013-03-31        8730        4442\n",
       "...                ...         ...\n",
       "2016-09-30       17427        6199\n",
       "2016-12-31       15984        6094\n",
       "2017-03-31       16426        5587\n",
       "2017-06-30       17486        6148\n",
       "2017-09-30       17990        6101"
      ]
     },
     "execution_count": 256,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(crime\n",
    "    .groupby(pd.Grouper(freq='Q')) \n",
    "    ['IS_CRIME', 'IS_TRAFFIC']\n",
    "    .sum()\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 257,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA7UAAAEXCAYAAAByEmP5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi40LCBodHRwOi8vbWF0cGxvdGxpYi5vcmcv7US4rQAAIABJREFUeJzs3XmcjeX/x/HXZYxd1uyZxpJtjJEllVRfKUQlUlNprCFEJRKy9xWVrN9JkpImS0oSKmQpS1RGyJIlZF+TbZbP749zzG9oMMaMM8v7+XicRzPXfZ37fp97TmM+57ru63ZmhoiIiIiIiEhalMnXAURERERERESSSkWtiIiIiIiIpFkqakVERERERCTNUlErIiIiIiIiaZaKWhEREREREUmzVNSKiIiIiIhImqWiVkREMgTn3Hrn3D2+zpFcnHPfO+faXqdj5XDOzXHOHXfORXjbhjrnDjvndjvnSjnnTl6PLFdypSzOucHOuUnXMZKIiKQwFbUiIhmQc26Hc+60c+5v59wx59yPzrkOzrk08e+Cc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2++MTOzkSNH2ksvvWRmSZ9+vHbtWgsJCUnU60wN51pEMo79+/dbp06dLHPmzJYjRw7r27evTxdtioqKsi5duhhgDRo0sGPHjvksi5gtXrzYAgICLFOmTNa3b1+tUnsVlixZEjcNt1WrVklaKTy1iY2NtRUrVlirVq0se/bscZcnvP/+++n+9iep3bFjx6xfv36WO3duc87Z008/na5X8t29e7e9/vrrcdcY58qVy9q0aZNu7ymbEsjo049Tg6xZs9KgQQMaNGhA4cKF+eKLL6hbt+5V72fRokXkzZuXp556in79+vH2229z5MgRFi5cyLp163DOERMTg3OO4cOHJzlvmTJl+PPPPzlx4oRGa0UkVTh58iRvv/02w4cP5/Tp07Rr145+/fpRpEgRn+bKnDkzo0aNolKlSnTu3Jnbb7+d2bNnU7p0aZ/mymjOnj1L3759efPNNyldujQ//PADtWrV8nWsNOWuu+5i7dq1DBw4kGHDhjF37lzGjh3Lo48+6utoiXL27Fl2797Nzp07+fPPP9mxYwezZs3i119/JVeuXDzzzDO0b99lo2+IAAAgAElEQVSeqlWr+jqqAHny5KF///506dKFN954gzFjxvDpp5/SunVr+vbtmyyX6/lKVFQU27ZtY+PGjWzcuJElS5bwzTffEBsbS506dejduzdNmzYlV65cvo6aLqmoTSE///wzRYoUoVixYsTGxhIZGUlwcHCS95c5c2beeecdKleuTJ8+fZgxYwYtWrTg3Xffjetz9913s3TpUkqWLJmkY+TIkYM2bdrQtWtX3n33XbJkycLBgwf5/vvveeyxx5KcXUTkakVFRTFhwgQGDBjA/v37efTRR3n99dcpV66cr6NdoH379txyyy00bdqU2267jc8++4y7777b17EyhHXr1vH0008TGRlJ+/btefPNN/XHYhJly5aN119/nccee4w2bdrQtGlTmjZtypgxY3z+AdLx48fZuXNnXNF68df79u3zrHzq5ZwjJCSE8PBwnnzySXLnzu3D9HIpBQoUYNiwYbzwwgu8/vrrvPvuu3z44Yd07NiRXr16UahQIV9HvKSTJ0+yadOmuOL1999/Z+PGjWzdupWoqKi4foGBgfTq1YuWLVtSpkwZ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z9OhRHyaWhBw9epSBAwcSEBBAz549CQkJYfHixSxevJh69eqpmE2kG264gS+//JKXXnqJsWPH0qBBg3T/fj9x4gStWrWiadOmBAYG8ssvv9CpUye9Z0RE5JqoqBWR6+LUqVM8+uijOOeYOXMmOXLkSLBfUFAQK1asoH///kydOpWgoCDmzp2bYF+5vg4ePMirr75KQEAA/fr146677mLlypXMnz+fOnXq+DpemuTn58ebb77JxIkTWbx4MbVq1WLz5s2+jpUilixZQnBwMB999BF9+/blxx9/pHz58r6OJSIi6YCKWhFJcWZGhw4diIyMZMqUKZQqdfnbWvv7+9OvXz9WrFhB3rx5adiwIc8++yx///33dUos8f3111+8+OKLBAQEMHToUBo2bMjatWuZNWsWNWvW9HW8dKFVq1YsWLCAI0eOcNttt/Hdd9/5OlKyOXv2LD179uSee+7B39+fH374gYEDB+Lv7+/raCIikk6oqBWRFDdu3DgmT55M//79adCgQaKfV61aNdasWUOPHj2YMGECwcHBfP/99ykXVC6wY8cOOnbsSGBgIKNGjaJ58+Zs2LCBTz/9lODgYF/HS3fuuusuVq1aRYkSJahfvz5jx471daRrtm7dOmrWrMmwYcN49tln+eWXX6hVq5avY4mISDqjolZEUtSPP/5It27daNSoEX369Lnq52fLlo033niDpUuXkjlzZu699166du3KqVOnUiCtgOeeoa1ataJs2bJMnDiRVq1asWXLFiZNmqTpoiksMDCQH3/8kYYNG9K5c2eee+45oqKifB3rqsXGxvLWW29RvXp19u/fz1dffUV4eDi5cuXydTQREUmHVNSKSIrZt28fzZo1IyAggMmTJ1/TfUrvvPNOfv31Vzp37syoUaMICQlh+fLlyZhW1q1bR2hoKBUqVGDq1Kl06tSJP/74g/DwcAIDA30dL8PInTs3n3/+OT169OB///sfDRo04MiRI76OlWh//vkndevWpXv37jRs2JB169bx4IMP+jqWiIikY7pPrYikiKioKOrWrcuaNWtYvnx5sk5XXbBgAa1bt2b37t306NGD/v37kzVr1mTbf0azevVqhgwZwhdffEGuXLno1KkTL7zwAoULF/Z1tAxv0qRJtG/fnpIlS/Lee++RP39+MmfOTObMmfHz80vwvxe3ZcqU6bqsLmxmTJkyhU6dOmFmjBo1irCwMK1sLCIiSZbY+9SqqBWRFNGtWzdGjhzJJ598QmhoaLLv/8SJE7z44ou8//77BAUF8dFHH1G1atVkP056tmzZMoYMGcK8efPImzcv3bp1o0uXLuTPn9/X0SSeH374gSZNmnDw4MEk7yMxxe+1tu3bt4+FCxdSu3ZtPvroI43ui4jINVNRKyI+ExERwZNPPknXrl155513UvRYc+bMoW3bthw6dIi+ffvSq1cvrap6GWbGggULGDx4MIsXL+bGG2/kpZdeomPHjtxwww2+jieXsH//flasWEF0dDQxMTFER0df8PX1bLvUNoC2bdvSvXt3/Pz8fHzGREQkPVBRKyI+sW7dOmrVqkW1atVYsGDBdSkwDx8+TJcuXYiIiKBatWp89NFHVKxYMcWPm5aYGXPmzGHw4MGsXLmSYsWK0aNHD9q1a3fJewaLiIiI+FJii1otFCUiyebYsWM0adKEPHnyMG3atOs2YlqgQAE++eQTpk2bxo4dO7j11lt5880340aPMrLY2FhmzJhB1apVady4Mfv37yc8PJxt27bRtWtXFbQiIiKS5qmoFZFkERsbS4sWLdi5cyczZsygSJEi1z3DY489xvr166lfvz4vv/wyd999N1u3br3uOVKD6OhoPv74Y4KCgnjsscc4c+YMH374IZs3b6Z9+/ZaWEtERETSDRW1IpIshgwZwldffcWIESO44447fJajcOHCfP7553z00Uf89ttvVKlShXHjxhEbG+uzTNfTuXPnmDBhAuXKlaNFixZkzpyZqVOnsn79ep555hldbywiIiLpjopaEblmc+fOpV+/frRo0YJOnTr5Og7OOVq0aMFvv/1G7dq16dSpEw888AB//vmnr6OlmNOnTzNmzBhKly5Nu3btyJ8/P7NmzeLXX3+lefPmWrhHRERE0i0VtSJyTbZt28aTTz5JcHAw4eHhqeqelCVKlGDevHmEh4ezfPlyKleuzKRJk0irC+RdzMzYunUrw4cPJzAwkC5dunDzzTczf/58Vq1axUMPPUSmTPo1LyIiIumbVj8WkSQ7deoUd9xxB3/++SerV6+mVKlSvo50Sdu2baNVq1YsWbKExo0bM378eJ9c93st9uzZw08//RT3WL16NUePHgWgXr169OnThzp16vg4pYiIiEjySOzqx5mvRxgRSX/MjA4dOhAZGcmcOXNSdUELUKpUKRYtWsSoUaPo1asXlSpVYty4cTz++OO+jpagI0eOXFDA/vTTT+zduxcAPz8/KleuTLNmzahZsyZ33HGHbmEkIiIiGZaKWhFJknHjxjF58mQGDBhAgwYNfB0nUTJlykS3bt2oX78+YWFhPPHEE8ycOZOxY8dSsGBBn+X6559/+Pnnn/npp59YtWoVP/30E9u2bYvbXq5cOerWrUuNGjWoUaMGISEhZM+e3Wd5RURERFITTT8Wkav2448/cvfdd1O/fn1mzZqVJq/bjI6OZtiwYfTv35/8+fMzfvx4HnrooRQ/7rlz54iMjLxgBHbDhg1xqzPfdNNN1KhRg5o1a1KjRg2qVatGnjx5UjyXiIiISGqT2OnHVyxqnXMTgUbAATMLumjbS8CbwI1mdsh5VogZCTQETgEtzexnb98woI/3qYPN7ENvezVgEpAd+BroaomotFXUivjGvn37uPXWW8mRIwerV68mb968vo50TdauXUtYWBhr166lZcuWvPPOO8lWRMbExPD7779fUMCuXbuWc+fOAVCwYMG40dfzj8KFCyfLsUVERETSuuQsausAJ4GP4he1zrmbgAlAeaCat6htCHTBU9TeBow0s9ucc/mB1UB1wIA13uccdc6tAp4HVuIpakeZ2dwrBVdRK3L9RUVFUbduXdasWcPy5csJDg72daRkce7cOQYNGsR///tfihYtysSJE6lXr95V7cPM2LFjxwUF7Jo1azh58iQAuXLlonr16hcUsAEBAalqtWgRERGR1CTZFooysyXOuZsT2DQC6AHMitf2MJ7i14AVzrm8zrmiwD3At2Z2xBvuW6C+c+574AYzW+Ft/wh4BLhiUSsi19/LL7/M0qVL+eSTT9JNQQuQJUsWBg0aROPGjQkLC+P++++nY8eODBs2jFy5ciX4nH379v1rJeJDhw7F7S8kJISwsLC4ArZcuXK6V6yIiIhICkjSQlHOuYeBPWa29qJRhuLArnjf7/a2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uBacAGYB7QycxivKOwnYH5wEZgmrcvQE/gRefcVjzX2L6frK9QJJ2bPXs2AwcOpFWrVrRv397XcUREREREriv3/zOH05bq1avb6tWrfR1DxKe2bNlC9erVKVu2LEuXLiV79uy+jiQiIiIikiycc2vMrPqV+iXH6sci4gMnT56kSZMm+Pv789lnn6mgFREREZEMKckLRYmI75gZbdq0YePGjcyfP5+AgABfRxIRERER8QkVtSJp0IgRI5g2bRpDhw7lvvvu83UcERERERGf0fRjkTRm0aJF9OjRg6ZNm9KjRw9fxxERERER8SkVtSJpyK5du3j88ccpW7YsH3zwAc45X0cSEREREfEpFbUiacTZs2dp1qwZZ86c4fPPPyd37ty+jiQiIiIi4nO6plYkjXj++edZtWoVM2fOpHz58r6OIyIiIiKSKmikViQNmDBhAuPHj6dXr140adLE13FERERERFINFbUiqdyqVavo1KkT9erVY9CgQb6OIyIiIiKSqqioFUnFDh48SLNmzShatCgRERH4+fn5OpKIiIiISKqia2pFUqno6GieeOIJDh48yA8//ECBAgV8HUlEREREJNVRUSuSSr366qssXLiQSZMmceutt/o6joiIiIhIqqTpxyKp0PTp0xk+fDjPPfccYWFhvo4jIiIiIpJqqagVSWXWr19Pq1atuP322xkxYoSv44iIiIiIpGoqajOoc+fOERsb6+sYcpHjx4/z6KOPkitXLmbMmEGWLFl8HUlEREREJFVTUZuB/P3333zyySc0adKEG264gXLlyjFp0iSioqJ8HU2A2NhYwsLC2LZtG9OnT6dYsWK+jiQiIiIikuqpqE3n4heyN954I0899RSrVq2iTZs25M6dm1atWlGuXDkmTJjAuXPnfB03Q/vvf//LrFmzeOutt7jrrrt8HUdEREREJE1QUZsOnThxgilTpvDII49cUMi2b9+eZcuWsWvXLsaOHcuaNWuYPXs2BQsWpF27dpQtW5bw8HDOnj3r65eQ4cybN4++ffvy1FNP0aVLF1/HERERERFJM5yZ+TpDklSvXt1Wr17t6xipxokTJ/jyyy+ZPn068+fP5+zZsxQvXpxmzZrx2GOPcfvtt5MpU8KfYZgZ8+fPZ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yTsaGH3diiLt/EKx/CAwJ1ocB70X2Wx+U7at8fZLypMxsopktNrPFmzdv7mHVc0t9fT2zZ8/m9NNPp6amhgsvvJBly5ZxxRVXsHDhQtatW8ett97a7Umfesvf//3f88QTT7BkyRJOPPFEpk2bxsiRI7n++uvZsmVLtquX8xobGzn77LPZsWMHjz32mAKtiIiIiEia0k5J3tbV2yezTbn7THevc/e6Aw88sC+eslds27aNe++9l9NOO61dkJ00aRILFy5k7dq13HrrrYwbN45cvcR4zJgx/Pa3v+XNN9/klFNO4cYbb6S2tpapU6fSX75w6A1Tpkzhj3/8I3fffTdHHnlktqsjIiIiIpL3ehpqNwbDjgl+bgrKNwAjIvsND8r2VT48SXm/Ew2yQ4YM4aKLLmL58uVceeWVvPrqq6xdu5Zbbrklp4NsMp/5zGeYO3cuy5Yt45/+6Z+YPn06tbW1XHXVVXz44YfZrl5Ouf/++7njjjv4zne+w1e/+tVsV0dEREREpF/oaah9AghnML4AmBcpPz+YBfmzwPZgmPLTwJfMbP9gpuQvAU8H23aY2WeDWY/Pj5wr723bto177rmHU089tUOQfe2111izZg0/+clPOPbYY/MqyCYzevRofvOb37BixQq+8pWvcPvtt3PwwQczefJk3n///WxXL+veeOMNJk6cyPjx47n55puzXR0RERERkX4jldmPH6RtoqcDgI3A94HHgbnAQcA64Bx33xoE0zuAU4DdwEXuvjg4z8XAdcFpf+Tu9wTldcC9QBnwe+AKT2H2qlyeKOqll17i5ptv5tlnn6W5uZna2tr4ZE91dXV5H2BTsXr1am688Ubuu+8+YrEYl156Kddeey0jRozo+uB+ZuvWrYwdO5ampiZef/11ampqsl0lEREREZGcl9HZj3NRLobarVu3cs0113DXXXcxbNgw/uVf/oVzzjmHsWPHDoggm8xf//pXbrrpJu655x7MjIsvvpipU6dSW1ub7ar1iZaWFk477TReeOEFFixYwLhx47JdJRERERGRvNDbsx9LhLszZ84cjjjiCO69916uvfZa3n77baZPnz5gemY7c8ghhzBz5kxWr17NpZdeyj333MOnP/1pLr30Ut55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ispd98ETAT+zcwsxWOWBvX7t0jxecD9wDPAmZmom4iISG9TqBUREQGC3tOTgCcixYcmDP09LsmhpwPLgFHA0iCwAvHwuhQYnfBcpcA44A8pVO24hDocmmwnd/8rbb2sNSmcM/Q6cHjk8VeBOcCDtAXcVPwkUrdfd+O5RUREMkLDj0VEZKArM7OltPWarqRtWHBoX8OPXzCzFuDPwPXA8Sk816HBcx0MzHf3P6dwTGfDjzMh3qtrZnXAR+7+rpltAO42s8HuvrWLc2j4sYiIZJV6akVEZKALr00dSVvIuzzF405w92Pc/Xx3rwdWAMdEJ2sK1o8JtsEnIflQYKyZnZGpF2FmhwAtwKZuHPZ3tAV5aOuZPdzM1gLv0HZ97lcyVT8REZHeolArIiICuPtu2iZ7mmJm3R7J5O6rgTdo67UNXQ+8HmyL7vsRMBX4bs9r/AkzOxD4JXCHu3uKx3wG+L/Az4PwfQ5wlLvXunstbdfUpjoEWUREJGsUakVERALu/gZtw4nDMJd4Te2kLk5xCfC3we183gH+NihL5nGgvJPrdKMSr6k9KygvC2/pA/w/2iZ3mpbCud4ws1XAz4FJwczHxwEb3P39yL4LgFFmNrSLc/4koX7FXewvIiKSUZbiF7oiIiIiIiIiOUc9tSIiIiIiIpK3NPuxiIhIP2JmJwM3JxSvcff/nY36iIiI9DYNPxYREREREZG8peHHIiIiIiIikrcUakVERERERCRvKdSKiIiIiIhI3lKoFRERERERkbz1/wHlDlbDOsnDkAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 1152x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, ax = plt.subplots(figsize=(16, 4))\n",
    "(crime\n",
    "    .groupby(pd.Grouper(freq='Q')) \n",
    "    ['IS_CRIME', 'IS_TRAFFIC']\n",
    "    .sum()\n",
    "    .plot(color=['black', 'lightgrey'], ax=ax,\n",
    "          title='Denver Crimes and Traffic Accidents')\n",
    ")\n",
    "fig.savefig('/tmp/c12-crimes2.png', dpi=300)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### How it works..."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 258,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>GEO_LON</th>\n",
       "      <th>GEO_LAT</th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2012-03-31</th>\n",
       "      <td>-1.313006...</td>\n",
       "      <td>496960.2...</td>\n",
       "      <td>7882</td>\n",
       "      <td>4726</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-06-30</th>\n",
       "      <td>-1.547274...</td>\n",
       "      <td>585656.7...</td>\n",
       "      <td>9641</td>\n",
       "      <td>5255</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-09-30</th>\n",
       "      <td>-1.615835...</td>\n",
       "      <td>611604.8...</td>\n",
       "      <td>10566</td>\n",
       "      <td>5003</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-12-31</th>\n",
       "      <td>-1.458177...</td>\n",
       "      <td>551923.0...</td>\n",
       "      <td>9197</td>\n",
       "      <td>4802</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-03-31</th>\n",
       "      <td>-1.368931...</td>\n",
       "      <td>518159.7...</td>\n",
       "      <td>8730</td>\n",
       "      <td>4442</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-09-30</th>\n",
       "      <td>-2.459343...</td>\n",
       "      <td>930926.4...</td>\n",
       "      <td>17427</td>\n",
       "      <td>6199</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-12-31</th>\n",
       "      <td>-2.293628...</td>\n",
       "      <td>868233.8...</td>\n",
       "      <td>15984</td>\n",
       "      <td>6094</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-03-31</th>\n",
       "      <td>-2.288383...</td>\n",
       "      <td>866234.2...</td>\n",
       "      <td>16426</td>\n",
       "      <td>5587</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-06-30</th>\n",
       "      <td>-2.453857...</td>\n",
       "      <td>928864.6...</td>\n",
       "      <td>17486</td>\n",
       "      <td>6148</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-09-30</th>\n",
       "      <td>-2.508001...</td>\n",
       "      <td>949396.3...</td>\n",
       "      <td>17990</td>\n",
       "      <td>6101</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>23 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                  GEO_LON      GEO_LAT  IS_CRIME  IS_TRAFFIC\n",
       "REPORTED_...                                                \n",
       "2012-03-31   -1.313006...  496960.2...      7882        4726\n",
       "2012-06-30   -1.547274...  585656.7...      9641        5255\n",
       "2012-09-30   -1.615835...  611604.8...     10566        5003\n",
       "2012-12-31   -1.458177...  551923.0...      9197        4802\n",
       "2013-03-31   -1.368931...  518159.7...      8730        4442\n",
       "...                   ...          ...       ...         ...\n",
       "2016-09-30   -2.459343...  930926.4...     17427        6199\n",
       "2016-12-31   -2.293628...  868233.8...     15984        6094\n",
       "2017-03-31   -2.288383...  866234.2...     16426        5587\n",
       "2017-06-30   -2.453857...  928864.6...     17486        6148\n",
       "2017-09-30   -2.508001...  949396.3...     17990        6101"
      ]
     },
     "execution_count": 258,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(crime\n",
    "    .resample('Q')\n",
    "    .sum()\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 259,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2011-12-01</th>\n",
       "      <td>5013</td>\n",
       "      <td>3198</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-03-01</th>\n",
       "      <td>9260</td>\n",
       "      <td>4954</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-06-01</th>\n",
       "      <td>10524</td>\n",
       "      <td>5190</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-09-01</th>\n",
       "      <td>9450</td>\n",
       "      <td>4777</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012-12-01</th>\n",
       "      <td>9003</td>\n",
       "      <td>4652</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-09-01</th>\n",
       "      <td>16932</td>\n",
       "      <td>6202</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-12-01</th>\n",
       "      <td>15615</td>\n",
       "      <td>5731</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-03-01</th>\n",
       "      <td>17287</td>\n",
       "      <td>5940</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-06-01</th>\n",
       "      <td>18545</td>\n",
       "      <td>6246</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-09-01</th>\n",
       "      <td>5417</td>\n",
       "      <td>1931</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>24 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "              IS_CRIME  IS_TRAFFIC\n",
       "REPORTED_...                      \n",
       "2011-12-01        5013        3198\n",
       "2012-03-01        9260        4954\n",
       "2012-06-01       10524        5190\n",
       "2012-09-01        9450        4777\n",
       "2012-12-01        9003        4652\n",
       "...                ...         ...\n",
       "2016-09-01       16932        6202\n",
       "2016-12-01       15615        5731\n",
       "2017-03-01       17287        5940\n",
       "2017-06-01       18545        6246\n",
       "2017-09-01        5417        1931"
      ]
     },
     "execution_count": 259,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(crime_sort\n",
    "    .resample('QS-MAR')\n",
    "    ['IS_CRIME', 'IS_TRAFFIC'] \n",
    "    .sum()\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### There's more..."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 260,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [],
   "source": [
    "crime_begin = (crime\n",
    "    .resample('Q')\n",
    "    ['IS_CRIME', 'IS_TRAFFIC']\n",
    "    .sum()\n",
    "    .iloc[0]\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 261,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x10f6c72b0>"
      ]
     },
     "execution_count": 261,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA6gAAAF2CAYAAABj6rVeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi40LCBodHRwOi8vbWF0cGxvdGxpYi5vcmcv7US4rQAAIABJREFUeJzs3Xm4HFWd//H3FwJhU9bIFgIIqEBgIgYQdRRFFFQWNxb9CSgOOqMjzvjMgMv8EJURt1HHQUcEBRkNmyOgIossLj8lEiCyhVW2IIQIIqKyf39/VN3Q93LXukud7rxfz9NPuquqqz99+nROn3tOVUVmIkmSJElS21ZoO4AkSZIkSWAHVZIkSZJUCDuokiRJkqQi2EGVJEmSJBXBDqokSZIkqQh2UCVJkiRJRbCDKkkalYi4LiJ2bTvHRImISyPi3VP0WqtFxI8i4o8RMa9edmxE3B8RiyPiuRHx8FRkGclIWSLiUxFx0hRGkiQtR+ygSlIDEXF7RPw1Iv4UEQ9GxC8j4r0R0RX/r0bEsyPiSxFxZ0Q8HBG31o/XG+o5mbltZl46hTFbERH/XZfJwxHxWEQ83vH4xw13uz+wDrBuZh4YEZsDHwCen5kzM/O3mbnGODK/OiIyIj7UdB99xptltCJiy4hodDH2iFg7Ii6sv3undH7vIuKbEbH3CM9f3Et/bJGkXtIVP6QkqVB7ZeazgE2BY4EjgBPbjdRfREwbZNnKwEXAtsAewLOBXYD7gZ1Gs49elpnvzcw16k7avwOn9T3OzD0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vIhYDR1GdtXc6cGF9HNBlmfnezLwuIk4Hrqea+vu+zHxyIoJee+21E7GbZWbPnj2h+5MkSZIkjc+II6iZeWBmbpiZK2XmzMw8MTO3zMxNMnNOfXtvx/bHZOYWmfn8zPzx5MafXGussQYATz31FB/4wAeYPXs22223HTvuuCO33XbboM/ZeeedmTNnDrNmzWLGjBnMmTOHOXPmcPvtt7PZZpux3Xbbsf322/OKV7yCO+64o99zzzrrLCKCG264Ydmy22+/nVVXXXXZfubMmcNjjz3GSSed1G//Bx10EACHHHIIZ555JgCPP/44Rx55JFtttRU77LADu+yyCz/+cVd/JJIkSZJ62EScxbfnnXbaafzud7/j6quvZoUVVmDx4sWsvvrqg27bd2bfk046iQULFvBf//Vf/dZfcsklrLfeehx11FF86lOf4hvf+MaydfPmzeNlL3sZ8+bN4+ijj162fIsttmDhwoXPeK3999//Gfvv9G//9m/cc889XHvttUyfPp0lS5bw05/+dEzvXZIkSZKmyrjO4ru8uOeee9hwww1ZYYWquGbOnMnaa689rn3usssu3H330+ePevjhh/nFL37BiSeeyKmnnjqufQP85S9/4Rvf+AZf+cpXmD59OgDrr78+++2337j3LUnSRIuIEW+SpN5nB3UU9ttvP37wgx8wZ84cPvShD3HVVVeNe5/nnXce++6777LHZ599NnvssQfPe97zWHfddbniiiuWrbv11luXTeV93/vet2z5aaedtmz5t771rX77v+WWW5g1axbPfvazx51VkiRJkqaCU3xHYebMmdx4441cfPHFXHzxxey2226cccYZ7LbbbmPe1ytf+UoeeOAB1lhjDT75yU8uWz5v3jwOP/xwAA444ADmzZvHi170IqD5FF9JkiRJ6iZ2UEdp+vTp7Lnnnuy5556sv/76nHXWWY06qJdccglrrbUWb3/72znqqKP4j//4Dx544AEuvvhirrnmGiKCJ598kojgc5/7XOO8W265JXfeeScPPfSQo6iSJEmSukLXdFDbvCzMlVdeyQYbbMBGG23EU089xdVXX83222/feH/Tpk3jS1/6Ettttx0f+9jHOPPMM3nHO97B17/+9WXbvOIVr+DnP/85s2bNavQa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AFwHvqS9+iKTHAP8OfNy2p7zP04APAJeXifT5wKm2Z2zP0H0GddrDfCMiInqRCWpERKxatjfRHbI7NzEb/wzqhgUe4nXAieUUM9uAE8uySa4GDp3nc62jxj+D+vKy/JC508wA36D7YqMPTfFYmyTdBlwObCjf4HsG8Gvbvxm57Q3AKZKOW+AxLxvre8QCt4+IiFgymvIXsxERERERERHLKntQIyIiIiIiogn5Ft+IiIiGSXo+cOnY4jtsv7SPnoiIiOWUQ3wjIiIiIiKiCTnENyIiIiIiIpqQCWpEREREREQ0IRPUiIiIiIiIaEImqBEREREREdGEvwK3kSkE0WYyQwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 1152x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, ax = plt.subplots(figsize=(16, 4))\n",
    "(crime\n",
    "    .resample('Q')\n",
    "    ['IS_CRIME', 'IS_TRAFFIC']\n",
    "    .sum()\n",
    "    .div(crime_begin)\n",
    "    .sub(1)\n",
    "    .round(2)\n",
    "    .mul(100)\n",
    "    .plot.bar(color=['black', 'lightgrey'], ax=ax,\n",
    "          title='Denver Crimes and Traffic Accidents % Increase')\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 262,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [],
   "source": [
    "fig.autofmt_xdate()\n",
    "fig.savefig('/tmp/c12-crimes3.png', dpi=300, bbox_inches='tight')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Measuring crime by weekday and year"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### How to do it..."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 263,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>OFFENSE_TYPE_ID</th>\n",
       "      <th>OFFENSE_CATEGORY_ID</th>\n",
       "      <th>REPORTED_DATE</th>\n",
       "      <th>...</th>\n",
       "      <th>NEIGHBORHOOD_ID</th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>traffic-...</td>\n",
       "      <td>traffic-...</td>\n",
       "      <td>2014-06-2...</td>\n",
       "      <td>...</td>\n",
       "      <td>cbd</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>vehicula...</td>\n",
       "      <td>all-othe...</td>\n",
       "      <td>2014-06-2...</td>\n",
       "      <td>...</td>\n",
       "      <td>east-colfax</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>disturbi...</td>\n",
       "      <td>public-d...</td>\n",
       "      <td>2014-06-2...</td>\n",
       "      <td>...</td>\n",
       "      <td>athmar-park</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>curfew</td>\n",
       "      <td>public-d...</td>\n",
       "      <td>2014-06-2...</td>\n",
       "      <td>...</td>\n",
       "      <td>sunnyside</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>aggravat...</td>\n",
       "      <td>aggravat...</td>\n",
       "      <td>2014-06-2...</td>\n",
       "      <td>...</td>\n",
       "      <td>college-...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>460906</th>\n",
       "      <td>burglary...</td>\n",
       "      <td>burglary</td>\n",
       "      <td>2017-09-1...</td>\n",
       "      <td>...</td>\n",
       "      <td>west-hig...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>460907</th>\n",
       "      <td>weapon-u...</td>\n",
       "      <td>all-othe...</td>\n",
       "      <td>2017-09-1...</td>\n",
       "      <td>...</td>\n",
       "      <td>barnum-west</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>460908</th>\n",
       "      <td>traf-hab...</td>\n",
       "      <td>all-othe...</td>\n",
       "      <td>2017-09-1...</td>\n",
       "      <td>...</td>\n",
       "      <td>montbello</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>460909</th>\n",
       "      <td>criminal...</td>\n",
       "      <td>public-d...</td>\n",
       "      <td>2017-09-1...</td>\n",
       "      <td>...</td>\n",
       "      <td>skyland</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>460910</th>\n",
       "      <td>theft-other</td>\n",
       "      <td>larceny</td>\n",
       "      <td>2017-09-1...</td>\n",
       "      <td>...</td>\n",
       "      <td>capitol-...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>460911 rows × 8 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       OFFENSE_TYPE_ID  ... IS_TRAFFIC\n",
       "0       traffic-...     ...          1\n",
       "1       vehicula...     ...          0\n",
       "2       disturbi...     ...          0\n",
       "3            curfew     ...          0\n",
       "4       aggravat...     ...          0\n",
       "...             ...     ...        ...\n",
       "460906  burglary...     ...          0\n",
       "460907  weapon-u...     ...          0\n",
       "460908  traf-hab...     ...          0\n",
       "460909  criminal...     ...          0\n",
       "460910  theft-other     ...          0"
      ]
     },
     "execution_count": 263,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime = pd.read_hdf('data/crime.h5', 'crime')\n",
    "crime"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 264,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Monday       70024\n",
       "Friday       69621\n",
       "Wednesday    69538\n",
       "Thursday     69287\n",
       "Tuesday      68394\n",
       "Saturday     58834\n",
       "Sunday       55213\n",
       "Name: REPORTED_DATE, dtype: int64"
      ]
     },
     "execution_count": 264,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(crime\n",
    "   ['REPORTED_DATE']\n",
    "   .dt.weekday_name \n",
    "   .value_counts()\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 265,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaIAAAEICAYAAAAdjPDnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi40LCBodHRwOi8vbWF0cGxvdGxpYi5vcmcv7US4rQAAIABJREFUeJzt3XucVdV5//HPV0AugqBA7IjKaCRGUSQ6Go2K1poYjTaxmsRLImLU1La51TQhtUnwF5ukaVpt1XqJF+LdoDElGitqpHiJ6HBH8S4JIop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nAt8C3s3rQ7tJ3AFMkzRL0mm5rJ7Pke2BF4Er8jTopZI2q/OYqx0LXJeX6yZuJ6JuLtJHkLq8B1/SQOAm4OsR8Vqxrh7jjog1ETGWNMLYG/hwySG1SdIRwPKImFV2LO2wf0TsARwG/K2kccXKOjxHepOmyS+MiI8Ab5CmtN5ThzG/J18n/EtgSnVd2XE7EbVuKbBtYX2bXFYPXpDUAJB/Ls/lrcW8vvJtWijfaJL6kJLQNRHxy+4SN0BEvArcTZqWGiKp8p2Mxf28F1uuHwy81I5j2Vj7AX8paTFwPWl67j+6QdxExNL8czlwMyn51/M58izwbETMzOs3khJTPcdcdBgwOyJeyOv1E3dHzj++nx6kTz9Pk4bjlYu0o0uKpZF1rxH9K+teZPxJXv4U615kfDCXb0ma294iP54Btsx11RcZD++AeAVcCZxbVV63cQPDgSF5uT9wD3AE6dNj8aL/3+Tlv2Xdi/6/yMujWfei/9OkC8Sdfj4BB7H2ZoW6jhvYDBhUWL4f+GQ9nyO5z3uAnfLypBxvXcdciP16YEI9/j52+Jvm++lBunvkcdK1gjNLiuE6YBnwNukT2ZdIc/p3AU8AdxZOBgEX5HgXAE2Ffk4GnsyP4snYBCzM25xP1YXYdsa8P2mYPx+Ymx+H13PcwBhgTo55IfC9XL5D/iV7kvTm3jeX98vrT+b6HQp9nZnjeozC3UOdfT6xbiKq67hzfPPy4+FKv/V8juQ+xwLN+Tz5FekNua5jzv1uRhr5Di6U1U3c/oofMzMrla8RmZlZqZyIzMysVE5EZmZWKiciMzMrlRORmZmVyonIzMxK5URkZmal+v/IK0Kp6D3EqAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday',\n",
    "        'Friday', 'Saturday', 'Sunday']\n",
    "title = 'Denver Crimes and Traffic Accidents per Weekday'\n",
    "fig, ax = plt.subplots(figsize=(6, 4))\n",
    "(crime\n",
    "   ['REPORTED_DATE']\n",
    "   .dt.weekday_name \n",
    "   .value_counts()\n",
    "   .reindex(days)\n",
    "   .plot.barh(title=title, ax=ax)\n",
    ")\n",
    "fig.savefig('/tmp/c12-crimes4.png', dpi=300, bbox_inches='tight')                 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 266,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEICAYAAAC55kg0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi40LCBodHRwOi8vbWF0cGxvdGxpYi5vcmcv7US4rQAAHJZJREFUeJzt3X2UXVWd5vHvQxLeSUgIhpgECpSWKZoW7MjEjgtpI/LiS9CxEbsb0giiDqtJ7LAk4nKWzlKb6WZQe7UjMtAQkBd5HaKMLzHC2GkhUsS0kQQMLwkhVhIBSYLYGMhv/ti7yLG8lXtupSr3hv181rqrztn73H33OXfXec4591RdRQRmZlamPdrdATMzax+HgJlZwRwCZmYFcwiYmRXMIWBmVjCHgJlZwRwC9gpJD0k6sd39GCqS7pV03i56rX0l3S1pk6Sbctmlkp6R9JSkIyQ9vyv60kyzvkj6vKRrd2GXrI0cAgOQtFrSbyVtkfScpB9L+pik3WKbSRot6cuSnpT0vKTH8vz4gZ4TEUdHxL27sJttIemKvE2el/Q7SVsr898ZZLMfBMYBB0XEhyQdDlwIvCEiJkfE4xGx/070+R2SQtLcwbbRZ2f7Upek10vquD9EkjQxh/Nb+5VfJ+kb7epXu+wWO7Q2ek9EHAAcBlwKXAxc3d4u/T5JIxuU7QksAo4GTgFGA28BngGOr9PGq1lEfCwi9s87wi8C3+ybj4hT+y9fc/scBjwSES9V5jdGxNND1O1ZwLPA2UPUXjH6v38R0QtcBFwlae+8zMnAO4HZw/naHSki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qAGyLijly8IZ+ak39uzOUDbZcdlU9uUN7JpgPvlbSadNr9duArpEsZff/rqroer6x7rh8DPEPr22p38BTwVEQsyfO3kUKh5PEC8A7giYj4VURsBe4gjSOPmRo6NQQeAI7Mn+7vSfrwZkGb+zTk8nXIq4GVEXF5pWoB0HfHxizgrkr52fmuj2nApnwZ4HvAOyWNzUdF7wS+l+s2S5qWX+vsSlsdKSI+FRGTI6KL9L7/MCL+CrgH+EBerP826dtWH8jLRy4/M98JcjhwJOlDz912bEXEemCtpDfkohnACgoeL9mTwDRJ++Z+922X4sdMLe3+ZHqgB+nOhl+QPpX/dLv7M0zr+FbSqfvPgGX5cRrp+uQiYBXwA2BcXl7AV/M2WQ5MrbT1YdIHWY8C51TKpwI/z8/5Z/Jfie8OD+BEtt8ddATpF/JR4FZgr1y+d55/NNcfUXn+p/N6P0LlLpfdeWwBxwI9ecz8H9LdPcWPF+BzwMO579eT7vDxmKnx8L+NMDMrWKdeDjIzs13AIWBmVjCHgJlZwRwCZmYFcwiYmRXMIWBmVjCHgJlZwf4/vAFC77QWXdIAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "title = 'Denver Crimes and Traffic Accidents per Year'\n",
    "fig, ax = plt.subplots(figsize=(6, 4))\n",
    "(crime\n",
    "   ['REPORTED_DATE']\n",
    "   .dt.year \n",
    "   .value_counts()\n",
    "   .plot.barh(title=title, ax=ax)\n",
    ")\n",
    "fig.savefig('/tmp/c12-crimes5.png', dpi=300, bbox_inches='tight')                 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 267,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "year  day      \n",
       "2012  Friday        8549\n",
       "      Monday        8786\n",
       "      Saturday      7442\n",
       "      Sunday        7189\n",
       "      Thursday      8440\n",
       "                   ...  \n",
       "2017  Saturday      8514\n",
       "      Sunday        8124\n",
       "      Thursday     10545\n",
       "      Tuesday      10628\n",
       "      Wednesday    10576\n",
       "Length: 42, dtype: int64"
      ]
     },
     "execution_count": 267,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(crime\n",
    "    .groupby([crime['REPORTED_DATE'].dt.year.rename('year'),\n",
    "              crime['REPORTED_DATE'].dt.weekday_name.rename('day')])\n",
    "    .size()\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 268,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>day</th>\n",
       "      <th>Friday</th>\n",
       "      <th>Monday</th>\n",
       "      <th>Saturday</th>\n",
       "      <th>Sunday</th>\n",
       "      <th>Thursday</th>\n",
       "      <th>Tuesday</th>\n",
       "      <th>Wednesday</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>year</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2012</th>\n",
       "      <td>8549</td>\n",
       "      <td>8786</td>\n",
       "      <td>7442</td>\n",
       "      <td>7189</td>\n",
       "      <td>8440</td>\n",
       "      <td>8191</td>\n",
       "      <td>8440</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013</th>\n",
       "      <td>10380</td>\n",
       "      <td>10627</td>\n",
       "      <td>8875</td>\n",
       "      <td>8444</td>\n",
       "      <td>10431</td>\n",
       "      <td>10416</td>\n",
       "      <td>10354</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014</th>\n",
       "      <td>12683</td>\n",
       "      <td>12813</td>\n",
       "      <td>10950</td>\n",
       "      <td>10278</td>\n",
       "      <td>12309</td>\n",
       "      <td>12440</td>\n",
       "      <td>12948</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015</th>\n",
       "      <td>13273</td>\n",
       "      <td>13452</td>\n",
       "      <td>11586</td>\n",
       "      <td>10624</td>\n",
       "      <td>13512</td>\n",
       "      <td>13381</td>\n",
       "      <td>13320</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016</th>\n",
       "      <td>14059</td>\n",
       "      <td>13708</td>\n",
       "      <td>11467</td>\n",
       "      <td>10554</td>\n",
       "      <td>14050</td>\n",
       "      <td>13338</td>\n",
       "      <td>13900</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017</th>\n",
       "      <td>10677</td>\n",
       "      <td>10638</td>\n",
       "      <td>8514</td>\n",
       "      <td>8124</td>\n",
       "      <td>10545</td>\n",
       "      <td>10628</td>\n",
       "      <td>10576</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "day   Friday  Monday  ...  Tuesday  Wednesday\n",
       "year                  ...                    \n",
       "2012    8549    8786  ...     8191       8440\n",
       "2013   10380   10627  ...    10416      10354\n",
       "2014   12683   12813  ...    12440      12948\n",
       "2015   13273   13452  ...    13381      13320\n",
       "2016   14059   13708  ...    13338      13900\n",
       "2017   10677   10638  ...    10628      10576"
      ]
     },
     "execution_count": 268,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(crime\n",
    "    .groupby([crime['REPORTED_DATE'].dt.year.rename('year'),\n",
    "              crime['REPORTED_DATE'].dt.weekday_name.rename('day')])\n",
    "    .size()\n",
    "    .unstack('day')\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 269,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "272"
      ]
     },
     "execution_count": 269,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "criteria = crime['REPORTED_DATE'].dt.year == 2017\n",
    "crime.loc[criteria, 'REPORTED_DATE'].dt.dayofyear.max()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 270,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.745"
      ]
     },
     "execution_count": 270,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "round(272 / 365, 3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 271,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [],
   "source": [
    "crime_pct = (crime\n",
    "   ['REPORTED_DATE']\n",
    "   .dt.dayofyear.le(272) \n",
    "   .groupby(crime.REPORTED_DATE.dt.year) \n",
    "   .mean()\n",
    "   .round(3)\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 272,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "REPORTED_DATE\n",
       "2012    0.748\n",
       "2013    0.725\n",
       "2014    0.751\n",
       "2015    0.748\n",
       "2016    0.752\n",
       "2017    1.000\n",
       "Name: REPORTED_DATE, dtype: float64"
      ]
     },
     "execution_count": 272,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime_pct"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 273,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.748"
      ]
     },
     "execution_count": 273,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime_pct.loc[2012:2016].median()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 274,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>day</th>\n",
       "      <th>Monday</th>\n",
       "      <th>Tuesday</th>\n",
       "      <th>Wednesday</th>\n",
       "      <th>Thursday</th>\n",
       "      <th>Friday</th>\n",
       "      <th>Saturday</th>\n",
       "      <th>Sunday</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>year</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2012</th>\n",
       "      <td>8786</td>\n",
       "      <td>8191</td>\n",
       "      <td>8440</td>\n",
       "      <td>8440</td>\n",
       "      <td>8549</td>\n",
       "      <td>7442</td>\n",
       "      <td>7189</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013</th>\n",
       "      <td>10627</td>\n",
       "      <td>10416</td>\n",
       "      <td>10354</td>\n",
       "      <td>10431</td>\n",
       "      <td>10380</td>\n",
       "      <td>8875</td>\n",
       "      <td>8444</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014</th>\n",
       "      <td>12813</td>\n",
       "      <td>12440</td>\n",
       "      <td>12948</td>\n",
       "      <td>12309</td>\n",
       "      <td>12683</td>\n",
       "      <td>10950</td>\n",
       "      <td>10278</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015</th>\n",
       "      <td>13452</td>\n",
       "      <td>13381</td>\n",
       "      <td>13320</td>\n",
       "      <td>13512</td>\n",
       "      <td>13273</td>\n",
       "      <td>11586</td>\n",
       "      <td>10624</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016</th>\n",
       "      <td>13708</td>\n",
       "      <td>13338</td>\n",
       "      <td>13900</td>\n",
       "      <td>14050</td>\n",
       "      <td>14059</td>\n",
       "      <td>11467</td>\n",
       "      <td>10554</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017</th>\n",
       "      <td>14221</td>\n",
       "      <td>14208</td>\n",
       "      <td>14139</td>\n",
       "      <td>14097</td>\n",
       "      <td>14274</td>\n",
       "      <td>11382</td>\n",
       "      <td>10860</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "day   Monday  Tuesday  ...  Saturday  Sunday\n",
       "year                   ...                  \n",
       "2012    8786     8191  ...      7442    7189\n",
       "2013   10627    10416  ...      8875    8444\n",
       "2014   12813    12440  ...     10950   10278\n",
       "2015   13452    13381  ...     11586   10624\n",
       "2016   13708    13338  ...     11467   10554\n",
       "2017   14221    14208  ...     11382   10860"
      ]
     },
     "execution_count": 274,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def update_2017(df_):\n",
    "    df_.loc[2017] = (df_\n",
    "        .loc[2017]\n",
    "        .div(.748) \n",
    "        .astype('int')\n",
    "    )\n",
    "    return df_\n",
    "(crime\n",
    "    .groupby([crime['REPORTED_DATE'].dt.year.rename('year'),\n",
    "              crime['REPORTED_DATE'].dt.weekday_name.rename('day')])\n",
    "    .size()\n",
    "    .unstack('day')\n",
    "    .pipe(update_2017)\n",
    "    .reindex(columns=days)\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 275,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXsAAAE6CAYAAAD3OvLCAAAABH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KeV+2zY/joi1pRkH40haXtgP2A74I3Ay8pN37H9MtsvBm4E3mP7IeAiYPdyn/3K/f40vlFHTAxJ9tEkrwG+a/v3th8EzinLXyjpUkk/B95BMbUDwNeBA8vnBwInjWu0ERNIkn1MBN8ADrG9LXAMsB6A7cuA2ZLmAZNtX19bhBENl2QfTXIJsJekZ0iaCrypLJ8K3F32x79jwDGnAN8irfqIYeUO2mgUSR8BDgDuAX5DsTbuI8ARwL0Uc+5Ptf2ucv9NgduAzWxnauaIISTZx4QmaW9gT9vvrDuWiCbLRGgxYUn6IrAbxcidiBhGWvYREX0gF2gjIvpAkn1ERB9Iso+I6ANJ9hERfSDJPiKiD/x/qMhVcp+7sPYAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import seaborn as sns\n",
    "fig, ax = plt.subplots(figsize=(6, 4))\n",
    "table = (crime\n",
    "    .groupby([crime['REPORTED_DATE'].dt.year.rename('year'),\n",
    "              crime['REPORTED_DATE'].dt.weekday_name.rename('day')])\n",
    "    .size()\n",
    "    .unstack('day')\n",
    "    .pipe(update_2017)\n",
    "    .reindex(columns=days)\n",
    ")\n",
    "sns.heatmap(table, cmap='Greys', ax=ax)\n",
    "fig.savefig('/tmp/c12-crimes6.png', dpi=300, bbox_inches='tight')                 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 276,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Population</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Year</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2017</th>\n",
       "      <td>705000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016</th>\n",
       "      <td>693000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015</th>\n",
       "      <td>680000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014</th>\n",
       "      <td>662000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013</th>\n",
       "      <td>647000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012</th>\n",
       "      <td>634000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      Population\n",
       "Year            \n",
       "2017      705000\n",
       "2016      693000\n",
       "2015      680000\n",
       "2014      662000\n",
       "2013      647000\n",
       "2012      634000"
      ]
     },
     "execution_count": 276,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "denver_pop = pd.read_csv('data/denver_pop.csv',\n",
    "    index_col='Year')\n",
    "denver_pop"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 277,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>day</th>\n",
       "      <th>Monday</th>\n",
       "      <th>Tuesday</th>\n",
       "      <th>Wednesday</th>\n",
       "      <th>Thursday</th>\n",
       "      <th>Friday</th>\n",
       "      <th>Saturday</th>\n",
       "      <th>Sunday</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2012</th>\n",
       "      <td>1385</td>\n",
       "      <td>1291</td>\n",
       "      <td>1331</td>\n",
       "      <td>1331</td>\n",
       "      <td>1348</td>\n",
       "      <td>1173</td>\n",
       "      <td>1133</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013</th>\n",
       "      <td>1642</td>\n",
       "      <td>1609</td>\n",
       "      <td>1600</td>\n",
       "      <td>1612</td>\n",
       "      <td>1604</td>\n",
       "      <td>1371</td>\n",
       "      <td>1305</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014</th>\n",
       "      <td>1935</td>\n",
       "      <td>1879</td>\n",
       "      <td>1955</td>\n",
       "      <td>1859</td>\n",
       "      <td>1915</td>\n",
       "      <td>1654</td>\n",
       "      <td>1552</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015</th>\n",
       "      <td>1978</td>\n",
       "      <td>1967</td>\n",
       "      <td>1958</td>\n",
       "      <td>1987</td>\n",
       "      <td>1951</td>\n",
       "      <td>1703</td>\n",
       "      <td>1562</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016</th>\n",
       "      <td>1978</td>\n",
       "      <td>1924</td>\n",
       "      <td>2005</td>\n",
       "      <td>2027</td>\n",
       "      <td>2028</td>\n",
       "      <td>1654</td>\n",
       "      <td>1522</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017</th>\n",
       "      <td>2017</td>\n",
       "      <td>2015</td>\n",
       "      <td>2005</td>\n",
       "      <td>1999</td>\n",
       "      <td>2024</td>\n",
       "      <td>1614</td>\n",
       "      <td>1540</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "day   Monday  Tuesday  ...  Saturday  Sunday\n",
       "2012    1385     1291  ...      1173    1133\n",
       "2013    1642     1609  ...      1371    1305\n",
       "2014    1935     1879  ...      1654    1552\n",
       "2015    1978     1967  ...      1703    1562\n",
       "2016    1978     1924  ...      1654    1522\n",
       "2017    2017     2015  ...      1614    1540"
      ]
     },
     "execution_count": 277,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "den_100k = denver_pop.div(100_000).squeeze()\n",
    "normalized = (crime\n",
    "    .groupby([crime['REPORTED_DATE'].dt.year.rename('year'),\n",
    "              crime['REPORTED_DATE'].dt.weekday_name.rename('day')])\n",
    "    .size()\n",
    "    .unstack('day')\n",
    "    .pipe(update_2017)\n",
    "    .reindex(columns=days)\n",
    "    .div(den_100k, axis='index')\n",
    "    .astype(int)\n",
    ")\n",
    "normalized"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 278,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWcAAAE6CAYAAADKqJOkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi40LCBodHRwOi8vbWF0cGxvdGxpYi5vcmcv7US4rQAAIABJREFUeJzt3Xu8XGV97/HPN5EimgvXIoIkeBq0IJKaSNUqDbUiKi32aLnUNoiVVItiy2nR1ipFhQO1nnOwWjVyO7QWi6BAK2Jpj1ykRggIcldEqEESlEQucjPwPX+sNTLZ7D1r7+yZvZ49+/t+vdYrM8+aNes3bNZvnnnWc5FtIiKiLLPaDiAiIp4uyTkiokBJzhERBUpyjogoUJJzRESBkpwjIgqU5BwRUaAk54iIAiU5R0QU6BmDPsENN9xQ5BDEHXbYoe0QRvXoo4+2HcK0s3HjxrZDGNWCBQvaDmFUW2yxRdsh9KJJv4E07pxje9LnG5SBJ+eIiKkkFZtvJyTJOSKGSpJ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gqU5BwDJ+mvJf1Z23FETCdJzhERBUpyjoGQ9H5J35H0deAFddmRkq6WdL2k8yQ9S9JcSd+XtEX9mnndzyNmqiTn6DtJS4BDgcXA64GX1ru+aPultvcGbgH+0PaDwKXAG+rXHFq/7mdTG3VEWZKcYxBeBXzJ9sO2HwAurMtfJOkKSTcAb6Eaag5wKnBE/fgI4IwpjTaiQEnOMZXOBN5ley/geOCZALavBBZKWgbMtn1jaxFGFCLJOQbhcuCNkraSNBf4rbp8LnBP3Z78lhHHnAX8E6k1RwAZIRgDIun9wOHAvcB/Ua1t+FPgWOBHVHNOz7X91vr1zwG+D+xkO1OdxoyX5BxFkPRm4CDbf9B2LBElyMRH0TpJfwe8jqpnR0SQmnNERJFyQzAiokBJzhERBUpyjogoUJJzRESBkpwjIgr0/wG8ra3DPjm4pwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import seaborn as sns\n",
    "fig, ax = plt.subplots(figsize=(6, 4))\n",
    "sns.heatmap(normalized, cmap='Greys', ax=ax)\n",
    "fig.savefig('/tmp/c12-crimes7.png', dpi=300, bbox_inches='tight')                 "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### How it works..."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 279,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Monday       70024\n",
       "Tuesday      68394\n",
       "Wednesday    69538\n",
       "Thursday     69287\n",
       "Friday       69621\n",
       "Saturday     58834\n",
       "Sunday       55213\n",
       "Name: REPORTED_DATE, dtype: int64"
      ]
     },
     "execution_count": 279,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(crime\n",
    "   ['REPORTED_DATE']\n",
    "   .dt.weekday_name \n",
    "   .value_counts()\n",
    "   .loc[days]\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 280,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>day</th>\n",
       "      <th>Friday</th>\n",
       "      <th>Monday</th>\n",
       "      <th>Saturday</th>\n",
       "      <th>Sunday</th>\n",
       "      <th>Thursday</th>\n",
       "      <th>Tuesday</th>\n",
       "      <th>Wednesday</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>year</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2012</th>\n",
       "      <td>8549</td>\n",
       "      <td>8786</td>\n",
       "      <td>7442</td>\n",
       "      <td>7189</td>\n",
       "      <td>8440</td>\n",
       "      <td>8191</td>\n",
       "      <td>8440</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013</th>\n",
       "      <td>10380</td>\n",
       "      <td>10627</td>\n",
       "      <td>8875</td>\n",
       "      <td>8444</td>\n",
       "      <td>10431</td>\n",
       "      <td>10416</td>\n",
       "      <td>10354</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014</th>\n",
       "      <td>12683</td>\n",
       "      <td>12813</td>\n",
       "      <td>10950</td>\n",
       "      <td>10278</td>\n",
       "      <td>12309</td>\n",
       "      <td>12440</td>\n",
       "      <td>12948</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015</th>\n",
       "      <td>13273</td>\n",
       "      <td>13452</td>\n",
       "      <td>11586</td>\n",
       "      <td>10624</td>\n",
       "      <td>13512</td>\n",
       "      <td>13381</td>\n",
       "      <td>13320</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016</th>\n",
       "      <td>14059</td>\n",
       "      <td>13708</td>\n",
       "      <td>11467</td>\n",
       "      <td>10554</td>\n",
       "      <td>14050</td>\n",
       "      <td>13338</td>\n",
       "      <td>13900</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017</th>\n",
       "      <td>10677</td>\n",
       "      <td>10638</td>\n",
       "      <td>8514</td>\n",
       "      <td>8124</td>\n",
       "      <td>10545</td>\n",
       "      <td>10628</td>\n",
       "      <td>10576</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "day   Friday  Monday  ...  Tuesday  Wednesday\n",
       "year                  ...                    \n",
       "2012    8549    8786  ...     8191       8440\n",
       "2013   10380   10627  ...    10416      10354\n",
       "2014   12683   12813  ...    12440      12948\n",
       "2015   13273   13452  ...    13381      13320\n",
       "2016   14059   13708  ...    13338      13900\n",
       "2017   10677   10638  ...    10628      10576"
      ]
     },
     "execution_count": 280,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(crime\n",
    "    .assign(year=crime.REPORTED_DATE.dt.year,\n",
    "            day=crime.REPORTED_DATE.dt.weekday_name)\n",
    "    .pipe(lambda df_: pd.crosstab(df_.year, df_.day))\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 281,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>2012</th>\n",
       "      <th>2013</th>\n",
       "      <th>2014</th>\n",
       "      <th>...</th>\n",
       "      <th>Thursday</th>\n",
       "      <th>Tuesday</th>\n",
       "      <th>Wednesday</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>year</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2012</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>6 rows × 13 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      2012  2013  2014  ...  Thursday  Tuesday  Wednesday\n",
       "year                    ...                              \n",
       "2012   NaN   NaN   NaN  ...       NaN      NaN        NaN\n",
       "2013   NaN   NaN   NaN  ...       NaN      NaN        NaN\n",
       "2014   NaN   NaN   NaN  ...       NaN      NaN        NaN\n",
       "2015   NaN   NaN   NaN  ...       NaN      NaN        NaN\n",
       "2016   NaN   NaN   NaN  ...       NaN      NaN        NaN\n",
       "2017   NaN   NaN   NaN  ...       NaN      NaN        NaN"
      ]
     },
     "execution_count": 281,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(crime\n",
    "    .groupby([crime['REPORTED_DATE'].dt.year.rename('year'),\n",
    "              crime['REPORTED_DATE'].dt.weekday_name.rename('day')])\n",
    "    .size()\n",
    "    .unstack('day')\n",
    "    .pipe(update_2017)\n",
    "    .reindex(columns=days)\n",
    ") / den_100k"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### There's more..."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 282,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>day</th>\n",
       "      <th>Monday</th>\n",
       "      <th>Tuesday</th>\n",
       "      <th>Wednesday</th>\n",
       "      <th>Thursday</th>\n",
       "      <th>Friday</th>\n",
       "      <th>Saturday</th>\n",
       "      <th>Sunday</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2012</th>\n",
       "      <td>95</td>\n",
       "      <td>72</td>\n",
       "      <td>72</td>\n",
       "      <td>76</td>\n",
       "      <td>71</td>\n",
       "      <td>78</td>\n",
       "      <td>76</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013</th>\n",
       "      <td>85</td>\n",
       "      <td>74</td>\n",
       "      <td>74</td>\n",
       "      <td>69</td>\n",
       "      <td>65</td>\n",
       "      <td>68</td>\n",
       "      <td>67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014</th>\n",
       "      <td>94</td>\n",
       "      <td>76</td>\n",
       "      <td>72</td>\n",
       "      <td>70</td>\n",
       "      <td>76</td>\n",
       "      <td>67</td>\n",
       "      <td>67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015</th>\n",
       "      <td>108</td>\n",
       "      <td>102</td>\n",
       "      <td>89</td>\n",
       "      <td>101</td>\n",
       "      <td>92</td>\n",
       "      <td>85</td>\n",
       "      <td>78</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016</th>\n",
       "      <td>119</td>\n",
       "      <td>102</td>\n",
       "      <td>100</td>\n",
       "      <td>99</td>\n",
       "      <td>97</td>\n",
       "      <td>86</td>\n",
       "      <td>85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017</th>\n",
       "      <td>114</td>\n",
       "      <td>118</td>\n",
       "      <td>111</td>\n",
       "      <td>106</td>\n",
       "      <td>111</td>\n",
       "      <td>91</td>\n",
       "      <td>102</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "day   Monday  Tuesday  ...  Saturday  Sunday\n",
       "2012      95       72  ...        78      76\n",
       "2013      85       74  ...        68      67\n",
       "2014      94       76  ...        67      67\n",
       "2015     108      102  ...        85      78\n",
       "2016     119      102  ...        86      85\n",
       "2017     114      118  ...        91     102"
      ]
     },
     "execution_count": 282,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday',\n",
    "        'Friday', 'Saturday', 'Sunday']\n",
    "crime_type = 'auto-theft'\n",
    "normalized = (crime\n",
    "    .query('OFFENSE_CATEGORY_ID == @crime_type')\n",
    "    .groupby([crime['REPORTED_DATE'].dt.year.rename('year'),\n",
    "              crime['REPORTED_DATE'].dt.weekday_name.rename('day')])\n",
    "    .size()\n",
    "    .unstack('day')\n",
    "    .pipe(update_2017)\n",
    "    .reindex(columns=days)\n",
    "    .div(den_100k, axis='index')\n",
    "    .astype(int)\n",
    ")\n",
    "normalized"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Grouping with anonymous functions with a DatetimeIndex"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### How to do it..."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 283,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [],
   "source": [
    "crime = (pd.read_hdf('data/crime.h5', 'crime') \n",
    "   .set_index('REPORTED_DATE') \n",
    "   .sort_index()\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 284,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['dayofweek',\n",
       " 'freq',\n",
       " 'resolution',\n",
       " 'tz_localize',\n",
       " 'month_name',\n",
       " 'is_quarter_start',\n",
       " 'weekday',\n",
       " 'microsecond',\n",
       " 'tz_convert',\n",
       " 'second',\n",
       " 'is_month_end',\n",
       " 'normalize',\n",
       " 'timetz',\n",
       " 'is_quarter_end',\n",
       " 'weekofyear',\n",
       " 'max',\n",
       " 'is_year_start',\n",
       " 'to_pydatetime',\n",
       " 'round',\n",
       " 'weekday_name',\n",
       " 'is_month_start',\n",
       " 'time',\n",
       " 'daysinmonth',\n",
       " 'nanosecond',\n",
       " 'day_name',\n",
       " 'to_julian_date',\n",
       " 'week',\n",
       " 'is_year_end',\n",
       " 'day',\n",
       " 'is_leap_year',\n",
       " 'minute',\n",
       " 'dayofyear',\n",
       " 'to_numpy',\n",
       " 'tzinfo',\n",
       " 'ceil',\n",
       " 'month',\n",
       " 'to_period',\n",
       " 'floor',\n",
       " 'hour',\n",
       " 'date',\n",
       " 'strftime',\n",
       " 'freqstr',\n",
       " 'year',\n",
       " 'tz',\n",
       " 'days_in_month',\n",
       " 'quarter',\n",
       " 'min']"
      ]
     },
     "execution_count": 284,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "common_attrs = (set(dir(crime.index)) & \n",
    "    set(dir(pd.Timestamp)))\n",
    "[attr for attr in common_attrs if attr[0] != '_']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 285,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Monday       70024\n",
       "Friday       69621\n",
       "Wednesday    69538\n",
       "Thursday     69287\n",
       "Tuesday      68394\n",
       "Saturday     58834\n",
       "Sunday       55213\n",
       "Name: REPORTED_DATE, dtype: int64"
      ]
     },
     "execution_count": 285,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crime.index.weekday_name.value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 286,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>IS_CRIME</th>\n",
       "      <th>IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Friday</th>\n",
       "      <td>48833</td>\n",
       "      <td>20814</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Monday</th>\n",
       "      <td>52158</td>\n",
       "      <td>17895</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Saturday</th>\n",
       "      <td>43363</td>\n",
       "      <td>15516</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Sunday</th>\n",
       "      <td>42315</td>\n",
       "      <td>12968</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Thursday</th>\n",
       "      <td>49470</td>\n",
       "      <td>19845</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Tuesday</th>\n",
       "      <td>49658</td>\n",
       "      <td>18755</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Wednesday</th>\n",
       "      <td>50054</td>\n",
       "      <td>19508</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           IS_CRIME  IS_TRAFFIC\n",
       "Friday        48833       20814\n",
       "Monday        52158       17895\n",
       "Saturday      43363       15516\n",
       "Sunday        42315       12968\n",
       "Thursday      49470       19845\n",
       "Tuesday       49658       18755\n",
       "Wednesday     50054       19508"
      ]
     },
     "execution_count": 286,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(crime\n",
    "   .groupby(lambda idx: idx.weekday_name) \n",
    "   ['IS_CRIME', 'IS_TRAFFIC']\n",
    "   .sum()    \n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 287,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th colspan=\"3\" halign=\"left\">IS_CRIME</th>\n",
       "      <th>...</th>\n",
       "      <th colspan=\"3\" halign=\"left\">IS_TRAFFIC</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>2012</th>\n",
       "      <th>2013</th>\n",
       "      <th>2014</th>\n",
       "      <th>...</th>\n",
       "      <th>2015</th>\n",
       "      <th>2016</th>\n",
       "      <th>2017</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2422</td>\n",
       "      <td>4040</td>\n",
       "      <td>5649</td>\n",
       "      <td>...</td>\n",
       "      <td>1136</td>\n",
       "      <td>980</td>\n",
       "      <td>782</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1888</td>\n",
       "      <td>3214</td>\n",
       "      <td>4245</td>\n",
       "      <td>...</td>\n",
       "      <td>773</td>\n",
       "      <td>718</td>\n",
       "      <td>537</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1472</td>\n",
       "      <td>2181</td>\n",
       "      <td>2956</td>\n",
       "      <td>...</td>\n",
       "      <td>471</td>\n",
       "      <td>464</td>\n",
       "      <td>313</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>1067</td>\n",
       "      <td>1365</td>\n",
       "      <td>1750</td>\n",
       "      <td>...</td>\n",
       "      <td>494</td>\n",
       "      <td>593</td>\n",
       "      <td>462</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>2998</td>\n",
       "      <td>3445</td>\n",
       "      <td>3727</td>\n",
       "      <td>...</td>\n",
       "      <td>2331</td>\n",
       "      <td>2372</td>\n",
       "      <td>1828</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>4266</td>\n",
       "      <td>5698</td>\n",
       "      <td>6708</td>\n",
       "      <td>...</td>\n",
       "      <td>2840</td>\n",
       "      <td>2763</td>\n",
       "      <td>1990</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>4113</td>\n",
       "      <td>5889</td>\n",
       "      <td>7351</td>\n",
       "      <td>...</td>\n",
       "      <td>3160</td>\n",
       "      <td>3527</td>\n",
       "      <td>2784</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>3660</td>\n",
       "      <td>5094</td>\n",
       "      <td>6586</td>\n",
       "      <td>...</td>\n",
       "      <td>3412</td>\n",
       "      <td>3608</td>\n",
       "      <td>2718</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>3521</td>\n",
       "      <td>4895</td>\n",
       "      <td>6130</td>\n",
       "      <td>...</td>\n",
       "      <td>2071</td>\n",
       "      <td>2184</td>\n",
       "      <td>1491</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>3078</td>\n",
       "      <td>4318</td>\n",
       "      <td>5496</td>\n",
       "      <td>...</td>\n",
       "      <td>1671</td>\n",
       "      <td>1472</td>\n",
       "      <td>1072</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>12 rows × 12 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   IS_CRIME                    ... IS_TRAFFIC                  \n",
       "       2012  2013  2014  2015  ...       2014  2015  2016  2017\n",
       "0      2422  4040  5649  5649  ...        978  1136   980   782\n",
       "2      1888  3214  4245  4050  ...        779   773   718   537\n",
       "4      1472  2181  2956  2959  ...        424   471   464   313\n",
       "6      1067  1365  1750  2167  ...        479   494   593   462\n",
       "8      2998  3445  3727  4161  ...       2210  2331  2372  1828\n",
       "..      ...   ...   ...   ...  ...        ...   ...   ...   ...\n",
       "14     4266  5698  6708  7218  ...       2630  2840  2763  1990\n",
       "16     4113  5889  7351  7643  ...       3002  3160  3527  2784\n",
       "18     3660  5094  6586  7015  ...       3217  3412  3608  2718\n",
       "20     3521  4895  6130  6360  ...       1994  2071  2184  1491\n",
       "22     3078  4318  5496  5626  ...       1532  1671  1472  1072"
      ]
     },
     "execution_count": 287,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "funcs = [lambda idx: idx.round('2h').hour, lambda idx: idx.year]\n",
    "(crime\n",
    "    .groupby(funcs) \n",
    "    ['IS_CRIME', 'IS_TRAFFIC']\n",
    "    .sum()\n",
    "    .unstack()\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 288,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "    #T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow6_col0 {\n",
       "            background-color:  lightgrey;\n",
       "        }    #T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow8_col1 {\n",
       "            background-color:  lightgrey;\n",
       "        }    #T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow8_col2 {\n",
       "            background-color:  lightgrey;\n",
       "        }    #T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow8_col3 {\n",
       "            background-color:  lightgrey;\n",
       "        }    #T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow8_col4 {\n",
       "            background-color:  lightgrey;\n",
       "        }    #T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow8_col5 {\n",
       "            background-color:  lightgrey;\n",
       "        }    #T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow8_col11 {\n",
       "            background-color:  lightgrey;\n",
       "        }    #T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow9_col6 {\n",
       "            background-color:  lightgrey;\n",
       "        }    #T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow9_col7 {\n",
       "            background-color:  lightgrey;\n",
       "        }    #T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow9_col8 {\n",
       "            background-color:  lightgrey;\n",
       "        }    #T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow9_col9 {\n",
       "            background-color:  lightgrey;\n",
       "        }    #T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow9_col10 {\n",
       "            background-color:  lightgrey;\n",
       "        }</style><table id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33f\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" colspan=6>IS_CRIME</th>        <th class=\"col_heading level0 col6\" colspan=6>IS_TRAFFIC</th>    </tr>    <tr>        <th class=\"blank level1\" ></th>        <th class=\"col_heading level1 col0\" >2012</th>        <th class=\"col_heading level1 col1\" >2013</th>        <th class=\"col_heading level1 col2\" >2014</th>        <th class=\"col_heading level1 col3\" >2015</th>        <th class=\"col_heading level1 col4\" >2016</th>        <th class=\"col_heading level1 col5\" >2017</th>        <th class=\"col_heading level1 col6\" >2012</th>        <th class=\"col_heading level1 col7\" >2013</th>        <th class=\"col_heading level1 col8\" >2014</th>        <th class=\"col_heading level1 col9\" >2015</th>        <th class=\"col_heading level1 col10\" >2016</th>        <th class=\"col_heading level1 col11\" >2017</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33flevel0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow0_col0\" class=\"data row0 col0\" >2422</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow0_col1\" class=\"data row0 col1\" >4040</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow0_col2\" class=\"data row0 col2\" >5649</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow0_col3\" class=\"data row0 col3\" >5649</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow0_col4\" class=\"data row0 col4\" >5377</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow0_col5\" class=\"data row0 col5\" >3811</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow0_col6\" class=\"data row0 col6\" >919</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow0_col7\" class=\"data row0 col7\" >792</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow0_col8\" class=\"data row0 col8\" >978</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow0_col9\" class=\"data row0 col9\" >1136</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow0_col10\" class=\"data row0 col10\" >980</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow0_col11\" class=\"data row0 col11\" >782</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33flevel0_row1\" class=\"row_heading level0 row1\" >2</th>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow1_col0\" class=\"data row1 col0\" >1888</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow1_col1\" class=\"data row1 col1\" >3214</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow1_col2\" class=\"data row1 col2\" >4245</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow1_col3\" class=\"data row1 col3\" >4050</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow1_col4\" class=\"data row1 col4\" >4091</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow1_col5\" class=\"data row1 col5\" >3041</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow1_col6\" class=\"data row1 col6\" >718</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow1_col7\" class=\"data row1 col7\" >652</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow1_col8\" class=\"data row1 col8\" >779</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow1_col9\" class=\"data row1 col9\" >773</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow1_col10\" class=\"data row1 col10\" >718</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow1_col11\" class=\"data row1 col11\" >537</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33flevel0_row2\" class=\"row_heading level0 row2\" >4</th>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow2_col0\" class=\"data row2 col0\" >1472</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow2_col1\" class=\"data row2 col1\" >2181</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow2_col2\" class=\"data row2 col2\" >2956</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow2_col3\" class=\"data row2 col3\" >2959</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow2_col4\" class=\"data row2 col4\" >3044</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow2_col5\" class=\"data row2 col5\" >2255</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow2_col6\" class=\"data row2 col6\" >399</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow2_col7\" class=\"data row2 col7\" >378</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow2_col8\" class=\"data row2 col8\" >424</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow2_col9\" class=\"data row2 col9\" >471</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow2_col10\" class=\"data row2 col10\" >464</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow2_col11\" class=\"data row2 col11\" >313</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33flevel0_row3\" class=\"row_heading level0 row3\" >6</th>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow3_col0\" class=\"data row3 col0\" >1067</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow3_col1\" class=\"data row3 col1\" >1365</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow3_col2\" class=\"data row3 col2\" >1750</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow3_col3\" class=\"data row3 col3\" >2167</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow3_col4\" class=\"data row3 col4\" >2108</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow3_col5\" class=\"data row3 col5\" >1567</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow3_col6\" class=\"data row3 col6\" >411</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow3_col7\" class=\"data row3 col7\" >399</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow3_col8\" class=\"data row3 col8\" >479</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow3_col9\" class=\"data row3 col9\" >494</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow3_col10\" class=\"data row3 col10\" >593</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow3_col11\" class=\"data row3 col11\" >462</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33flevel0_row4\" class=\"row_heading level0 row4\" >8</th>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow4_col0\" class=\"data row4 col0\" >2998</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow4_col1\" class=\"data row4 col1\" >3445</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow4_col2\" class=\"data row4 col2\" >3727</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow4_col3\" class=\"data row4 col3\" >4161</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow4_col4\" class=\"data row4 col4\" >4488</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow4_col5\" class=\"data row4 col5\" >3251</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow4_col6\" class=\"data row4 col6\" >1957</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow4_col7\" class=\"data row4 col7\" >1955</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow4_col8\" class=\"data row4 col8\" >2210</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow4_col9\" class=\"data row4 col9\" >2331</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow4_col10\" class=\"data row4 col10\" >2372</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow4_col11\" class=\"data row4 col11\" >1828</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33flevel0_row5\" class=\"row_heading level0 row5\" >10</th>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow5_col0\" class=\"data row5 col0\" >4305</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow5_col1\" class=\"data row5 col1\" >5035</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow5_col2\" class=\"data row5 col2\" >5658</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow5_col3\" class=\"data row5 col3\" >6205</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow5_col4\" class=\"data row5 col4\" >6218</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow5_col5\" class=\"data row5 col5\" >4993</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow5_col6\" class=\"data row5 col6\" >1979</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow5_col7\" class=\"data row5 col7\" >1901</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow5_col8\" class=\"data row5 col8\" >2139</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow5_col9\" class=\"data row5 col9\" >2320</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow5_col10\" class=\"data row5 col10\" >2303</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow5_col11\" class=\"data row5 col11\" >1873</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33flevel0_row6\" class=\"row_heading level0 row6\" >12</th>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow6_col0\" class=\"data row6 col0\" >4496</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow6_col1\" class=\"data row6 col1\" >5524</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow6_col2\" class=\"data row6 col2\" >6434</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow6_col3\" class=\"data row6 col3\" >6841</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow6_col4\" class=\"data row6 col4\" >7226</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow6_col5\" class=\"data row6 col5\" >5463</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow6_col6\" class=\"data row6 col6\" >2200</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow6_col7\" class=\"data row6 col7\" >2138</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow6_col8\" class=\"data row6 col8\" >2379</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow6_col9\" class=\"data row6 col9\" >2631</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow6_col10\" class=\"data row6 col10\" >2760</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow6_col11\" class=\"data row6 col11\" >1986</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33flevel0_row7\" class=\"row_heading level0 row7\" >14</th>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow7_col0\" class=\"data row7 col0\" >4266</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow7_col1\" class=\"data row7 col1\" >5698</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow7_col2\" class=\"data row7 col2\" >6708</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow7_col3\" class=\"data row7 col3\" >7218</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow7_col4\" class=\"data row7 col4\" >6896</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow7_col5\" class=\"data row7 col5\" >5396</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow7_col6\" class=\"data row7 col6\" >2241</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow7_col7\" class=\"data row7 col7\" >2245</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow7_col8\" class=\"data row7 col8\" >2630</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow7_col9\" class=\"data row7 col9\" >2840</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow7_col10\" class=\"data row7 col10\" >2763</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow7_col11\" class=\"data row7 col11\" >1990</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33flevel0_row8\" class=\"row_heading level0 row8\" >16</th>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow8_col0\" class=\"data row8 col0\" >4113</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow8_col1\" class=\"data row8 col1\" >5889</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow8_col2\" class=\"data row8 col2\" >7351</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow8_col3\" class=\"data row8 col3\" >7643</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow8_col4\" class=\"data row8 col4\" >7926</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow8_col5\" class=\"data row8 col5\" >6338</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow8_col6\" class=\"data row8 col6\" >2714</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow8_col7\" class=\"data row8 col7\" >2562</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow8_col8\" class=\"data row8 col8\" >3002</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow8_col9\" class=\"data row8 col9\" >3160</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow8_col10\" class=\"data row8 col10\" >3527</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow8_col11\" class=\"data row8 col11\" >2784</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33flevel0_row9\" class=\"row_heading level0 row9\" >18</th>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow9_col0\" class=\"data row9 col0\" >3660</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow9_col1\" class=\"data row9 col1\" >5094</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow9_col2\" class=\"data row9 col2\" >6586</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow9_col3\" class=\"data row9 col3\" >7015</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow9_col4\" class=\"data row9 col4\" >7407</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow9_col5\" class=\"data row9 col5\" >6157</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow9_col6\" class=\"data row9 col6\" >3118</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow9_col7\" class=\"data row9 col7\" >2704</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow9_col8\" class=\"data row9 col8\" >3217</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow9_col9\" class=\"data row9 col9\" >3412</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow9_col10\" class=\"data row9 col10\" >3608</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow9_col11\" class=\"data row9 col11\" >2718</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33flevel0_row10\" class=\"row_heading level0 row10\" >20</th>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow10_col0\" class=\"data row10 col0\" >3521</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow10_col1\" class=\"data row10 col1\" >4895</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow10_col2\" class=\"data row10 col2\" >6130</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow10_col3\" class=\"data row10 col3\" >6360</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow10_col4\" class=\"data row10 col4\" >6963</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow10_col5\" class=\"data row10 col5\" >5272</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow10_col6\" class=\"data row10 col6\" >1787</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow10_col7\" class=\"data row10 col7\" >1806</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow10_col8\" class=\"data row10 col8\" >1994</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow10_col9\" class=\"data row10 col9\" >2071</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow10_col10\" class=\"data row10 col10\" >2184</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow10_col11\" class=\"data row10 col11\" >1491</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33flevel0_row11\" class=\"row_heading level0 row11\" >22</th>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow11_col0\" class=\"data row11 col0\" >3078</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow11_col1\" class=\"data row11 col1\" >4318</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow11_col2\" class=\"data row11 col2\" >5496</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow11_col3\" class=\"data row11 col3\" >5626</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow11_col4\" class=\"data row11 col4\" >5637</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow11_col5\" class=\"data row11 col5\" >4358</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow11_col6\" class=\"data row11 col6\" >1343</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow11_col7\" class=\"data row11 col7\" >1330</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow11_col8\" class=\"data row11 col8\" >1532</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow11_col9\" class=\"data row11 col9\" >1671</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow11_col10\" class=\"data row11 col10\" >1472</td>\n",
       "                        <td id=\"T_2041b5fe_3244_11ea_9fe0_a45e60ecc33frow11_col11\" class=\"data row11 col11\" >1072</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x12b07f278>"
      ]
     },
     "execution_count": 288,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "funcs = [lambda idx: idx.round('2h').hour, lambda idx: idx.year]\n",
    "(crime\n",
    "    .groupby(funcs) \n",
    "    ['IS_CRIME', 'IS_TRAFFIC']\n",
    "    .sum()\n",
    "    .unstack()\n",
    "    .style.highlight_max(color='lightgrey')\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### How it works..."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Grouping by a Timestamp and another column"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### How to do it..."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 289,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>UNIQUE_ID</th>\n",
       "      <th>POSITION_TITLE</th>\n",
       "      <th>DEPARTMENT</th>\n",
       "      <th>...</th>\n",
       "      <th>GENDER</th>\n",
       "      <th>EMPLOYMENT_STATUS</th>\n",
       "      <th>JOB_DATE</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>HIRE_DATE</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2006-06-12</th>\n",
       "      <td>0</td>\n",
       "      <td>ASSISTAN...</td>\n",
       "      <td>Municipa...</td>\n",
       "      <td>...</td>\n",
       "      <td>Female</td>\n",
       "      <td>Active</td>\n",
       "      <td>2012-10-13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2000-07-19</th>\n",
       "      <td>1</td>\n",
       "      <td>LIBRARY ...</td>\n",
       "      <td>Library</td>\n",
       "      <td>...</td>\n",
       "      <td>Female</td>\n",
       "      <td>Active</td>\n",
       "      <td>2010-09-18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-02-03</th>\n",
       "      <td>2</td>\n",
       "      <td>POLICE O...</td>\n",
       "      <td>Houston ...</td>\n",
       "      <td>...</td>\n",
       "      <td>Male</td>\n",
       "      <td>Active</td>\n",
       "      <td>2015-02-03</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1982-02-08</th>\n",
       "      <td>3</td>\n",
       "      <td>ENGINEER...</td>\n",
       "      <td>Houston ...</td>\n",
       "      <td>...</td>\n",
       "      <td>Male</td>\n",
       "      <td>Active</td>\n",
       "      <td>1991-05-25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1989-06-19</th>\n",
       "      <td>4</td>\n",
       "      <td>ELECTRICIAN</td>\n",
       "      <td>General ...</td>\n",
       "      <td>...</td>\n",
       "      <td>Male</td>\n",
       "      <td>Active</td>\n",
       "      <td>1994-10-22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014-06-09</th>\n",
       "      <td>1995</td>\n",
       "      <td>POLICE O...</td>\n",
       "      <td>Houston ...</td>\n",
       "      <td>...</td>\n",
       "      <td>Male</td>\n",
       "      <td>Active</td>\n",
       "      <td>2015-06-09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2003-09-02</th>\n",
       "      <td>1996</td>\n",
       "      <td>COMMUNIC...</td>\n",
       "      <td>Houston ...</td>\n",
       "      <td>...</td>\n",
       "      <td>Male</td>\n",
       "      <td>Active</td>\n",
       "      <td>2013-10-06</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014-10-13</th>\n",
       "      <td>1997</td>\n",
       "      <td>POLICE O...</td>\n",
       "      <td>Houston ...</td>\n",
       "      <td>...</td>\n",
       "      <td>Male</td>\n",
       "      <td>Active</td>\n",
       "      <td>2015-10-13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2009-01-20</th>\n",
       "      <td>1998</td>\n",
       "      <td>POLICE O...</td>\n",
       "      <td>Houston ...</td>\n",
       "      <td>...</td>\n",
       "      <td>Male</td>\n",
       "      <td>Active</td>\n",
       "      <td>2011-07-02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2009-01-12</th>\n",
       "      <td>1999</td>\n",
       "      <td>FIRE FIG...</td>\n",
       "      <td>Houston ...</td>\n",
       "      <td>...</td>\n",
       "      <td>Male</td>\n",
       "      <td>Active</td>\n",
       "      <td>2010-07-12</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>2000 rows × 9 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "            UNIQUE_ID  ...   JOB_DATE\n",
       "HIRE_DATE              ...           \n",
       "2006-06-12          0  ... 2012-10-13\n",
       "2000-07-19          1  ... 2010-09-18\n",
       "2015-02-03          2  ... 2015-02-03\n",
       "1982-02-08          3  ... 1991-05-25\n",
       "1989-06-19          4  ... 1994-10-22\n",
       "...               ...  ...        ...\n",
       "2014-06-09       1995  ... 2015-06-09\n",
       "2003-09-02       1996  ... 2013-10-06\n",
       "2014-10-13       1997  ... 2015-10-13\n",
       "2009-01-20       1998  ... 2011-07-02\n",
       "2009-01-12       1999  ... 2010-07-12"
      ]
     },
     "execution_count": 289,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "employee = pd.read_csv('data/employee.csv',\n",
    "    parse_dates=['JOB_DATE', 'HIRE_DATE'],\n",
    "    index_col='HIRE_DATE')\n",
    "employee"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 290,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "GENDER\n",
       "Female    52200.0\n",
       "Male      57400.0\n",
       "Name: BASE_SALARY, dtype: float64"
      ]
     },
     "execution_count": 290,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(employee\n",
    "    .groupby('GENDER')\n",
    "    ['BASE_SALARY']\n",
    "    .mean()\n",
    "    .round(-2)\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 291,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "HIRE_DATE\n",
       "1958-01-01     81200.0\n",
       "1968-01-01    106500.0\n",
       "1978-01-01     69600.0\n",
       "1988-01-01     62300.0\n",
       "1998-01-01     58200.0\n",
       "2008-01-01     47200.0\n",
       "Freq: 10AS-JAN, Name: BASE_SALARY, dtype: float64"
      ]
     },
     "execution_count": 291,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(employee\n",
    "    .resample('10AS')\n",
    "    ['BASE_SALARY']\n",
    "    .mean()\n",
    "    .round(-2)    \n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 292,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "GENDER  HIRE_DATE \n",
       "Female  1975-01-01     51600.0\n",
       "        1985-01-01     57600.0\n",
       "        1995-01-01     55500.0\n",
       "        2005-01-01     51700.0\n",
       "        2015-01-01     38600.0\n",
       "                        ...   \n",
       "Male    1968-01-01    106500.0\n",
       "        1978-01-01     72300.0\n",
       "        1988-01-01     64600.0\n",
       "        1998-01-01     59700.0\n",
       "        2008-01-01     47200.0\n",
       "Name: BASE_SALARY, Length: 11, dtype: float64"
      ]
     },
     "execution_count": 292,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(employee\n",
    "   .groupby('GENDER')\n",
    "   .resample('10AS')\n",
    "   ['BASE_SALARY'] \n",
    "   .mean()\n",
    "   .round(-2)\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 293,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>GENDER</th>\n",
       "      <th>Female</th>\n",
       "      <th>Male</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>HIRE_DATE</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1958-01-01</th>\n",
       "      <td>NaN</td>\n",
       "      <td>81200.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1968-01-01</th>\n",
       "      <td>NaN</td>\n",
       "      <td>106500.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1975-01-01</th>\n",
       "      <td>51600.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1978-01-01</th>\n",
       "      <td>NaN</td>\n",
       "      <td>72300.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1985-01-01</th>\n",
       "      <td>57600.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1995-01-01</th>\n",
       "      <td>55500.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1998-01-01</th>\n",
       "      <td>NaN</td>\n",
       "      <td>59700.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2005-01-01</th>\n",
       "      <td>51700.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2008-01-01</th>\n",
       "      <td>NaN</td>\n",
       "      <td>47200.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-01-01</th>\n",
       "      <td>38600.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>11 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "GENDER       Female      Male\n",
       "HIRE_DATE                    \n",
       "1958-01-01      NaN   81200.0\n",
       "1968-01-01      NaN  106500.0\n",
       "1975-01-01  51600.0       NaN\n",
       "1978-01-01      NaN   72300.0\n",
       "1985-01-01  57600.0       NaN\n",
       "...             ...       ...\n",
       "1995-01-01  55500.0       NaN\n",
       "1998-01-01      NaN   59700.0\n",
       "2005-01-01  51700.0       NaN\n",
       "2008-01-01      NaN   47200.0\n",
       "2015-01-01  38600.0       NaN"
      ]
     },
     "execution_count": 293,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(employee\n",
    "   .groupby('GENDER')\n",
    "   .resample('10AS')\n",
    "   ['BASE_SALARY'] \n",
    "   .mean()\n",
    "   .round(-2)\n",
    "   .unstack('GENDER')\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 294,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('1958-12-29 00:00:00')"
      ]
     },
     "execution_count": 294,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "employee[employee['GENDER'] == 'Male'].index.min()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 295,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('1975-06-09 00:00:00')"
      ]
     },
     "execution_count": 295,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "employee[employee['GENDER'] == 'Female'].index.min()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 296,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "GENDER  HIRE_DATE \n",
       "Female  1968-01-01         NaN\n",
       "        1978-01-01     57100.0\n",
       "        1988-01-01     57100.0\n",
       "        1998-01-01     54700.0\n",
       "        2008-01-01     47300.0\n",
       "                        ...   \n",
       "Male    1968-01-01    106500.0\n",
       "        1978-01-01     72300.0\n",
       "        1988-01-01     64600.0\n",
       "        1998-01-01     59700.0\n",
       "        2008-01-01     47200.0\n",
       "Name: BASE_SALARY, Length: 11, dtype: float64"
      ]
     },
     "execution_count": 296,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(employee\n",
    "   .groupby(['GENDER', pd.Grouper(freq='10AS')]) \n",
    "   ['BASE_SALARY']\n",
    "   .mean()\n",
    "   .round(-2)\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 297,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>GENDER</th>\n",
       "      <th>Female</th>\n",
       "      <th>Male</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>HIRE_DATE</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1958-01-01</th>\n",
       "      <td>NaN</td>\n",
       "      <td>81200.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1968-01-01</th>\n",
       "      <td>NaN</td>\n",
       "      <td>106500.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1978-01-01</th>\n",
       "      <td>57100.0</td>\n",
       "      <td>72300.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1988-01-01</th>\n",
       "      <td>57100.0</td>\n",
       "      <td>64600.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1998-01-01</th>\n",
       "      <td>54700.0</td>\n",
       "      <td>59700.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2008-01-01</th>\n",
       "      <td>47300.0</td>\n",
       "      <td>47200.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "GENDER       Female      Male\n",
       "HIRE_DATE                    \n",
       "1958-01-01      NaN   81200.0\n",
       "1968-01-01      NaN  106500.0\n",
       "1978-01-01  57100.0   72300.0\n",
       "1988-01-01  57100.0   64600.0\n",
       "1998-01-01  54700.0   59700.0\n",
       "2008-01-01  47300.0   47200.0"
      ]
     },
     "execution_count": 297,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(employee\n",
    "   .groupby(['GENDER', pd.Grouper(freq='10AS')]) \n",
    "   ['BASE_SALARY']\n",
    "   .mean()\n",
    "   .round(-2)\n",
    "   .unstack('GENDER')\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### How it works..."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### There's more..."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 298,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>GENDER</th>\n",
       "      <th>Female</th>\n",
       "      <th>Male</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>HIRE_DATE</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1958-1967</th>\n",
       "      <td>NaN</td>\n",
       "      <td>81200.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1968-1977</th>\n",
       "      <td>NaN</td>\n",
       "      <td>106500.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1978-1987</th>\n",
       "      <td>57100.0</td>\n",
       "      <td>72300.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1988-1997</th>\n",
       "      <td>57100.0</td>\n",
       "      <td>64600.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1998-2007</th>\n",
       "      <td>54700.0</td>\n",
       "      <td>59700.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2008-2017</th>\n",
       "      <td>47300.0</td>\n",
       "      <td>47200.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "GENDER      Female      Male\n",
       "HIRE_DATE                   \n",
       "1958-1967      NaN   81200.0\n",
       "1968-1977      NaN  106500.0\n",
       "1978-1987  57100.0   72300.0\n",
       "1988-1997  57100.0   64600.0\n",
       "1998-2007  54700.0   59700.0\n",
       "2008-2017  47300.0   47200.0"
      ]
     },
     "execution_count": 298,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sal_final = (employee\n",
    "   .groupby(['GENDER', pd.Grouper(freq='10AS')]) \n",
    "   ['BASE_SALARY']\n",
    "   .mean()\n",
    "   .round(-2)\n",
    "   .unstack('GENDER')\n",
    ")\n",
    "years = sal_final.index.year\n",
    "years_right = years + 9\n",
    "sal_final.index = years.astype(str) + '-' + years_right.astype(str)\n",
    "sal_final"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 299,
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "IntervalArray([(1958.0, 1970.0], (1970.0, 1981.0], (1981.0, 1993.0], (1993.0, 2004.0], (2004.0, 2016.0]],\n",
       "              closed='right',\n",
       "              dtype='interval[float64]')"
      ]
     },
     "execution_count": 299,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cuts = pd.cut(employee.index.year, bins=5, precision=0)\n",
    "cuts.categories.values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 300,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>GENDER</th>\n",
       "      <th>Female</th>\n",
       "      <th>Male</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>(1958.0, 1970.0]</th>\n",
       "      <td>NaN</td>\n",
       "      <td>85400.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>(1970.0, 1981.0]</th>\n",
       "      <td>54400.0</td>\n",
       "      <td>72700.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>(1981.0, 1993.0]</th>\n",
       "      <td>55700.0</td>\n",
       "      <td>69300.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>(1993.0, 2004.0]</th>\n",
       "      <td>56500.0</td>\n",
       "      <td>62300.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>(2004.0, 2016.0]</th>\n",
       "      <td>49100.0</td>\n",
       "      <td>49800.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "GENDER         Female     Male\n",
       "(1958.0, ...      NaN  85400.0\n",
       "(1970.0, ...  54400.0  72700.0\n",
       "(1981.0, ...  55700.0  69300.0\n",
       "(1993.0, ...  56500.0  62300.0\n",
       "(2004.0, ...  49100.0  49800.0"
      ]
     },
     "execution_count": 300,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(employee\n",
    "    .groupby([cuts, 'GENDER'])\n",
    "    ['BASE_SALARY'] \n",
    "    .mean()\n",
    "    .unstack('GENDER')\n",
    "    .round(-2)\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "jupytext": {
   "cell_metadata_filter": "-all",
   "main_language": "python",
   "notebook_metadata_filter": "-all"
  },
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
